I am looking at an old exam question and it asks:

Prove that the set of quadratic residues mod p is a subgroup ofAn integer q is in the set of quadratic residues if it solves this equation

x^2 equiv q mod p (Sorry can't figure out the Latex for this)

Where x is some integer. Not sure how I can prove that the set of all q's that solve that equation is in the multiplicative group of p or