$28 + p \sqrt{3} = (q + 2 \sqrt{3})^2$, where p and q are integers, find the values of p and of q. This is how much I have solved so far,

$$28 + p \sqrt{3} = (q + 2 \sqrt{3})^2$$
$$ \implies28 + p \sqrt{3} = q^2 + (4 \sqrt{3})q + 12$$
$$\implies p \sqrt{3} = q^2 + (4 \sqrt{3})q - 16$$
$$\implies p = (q^2 + (4 \sqrt{3})q - 16)/(\sqrt{3})$$

which gives $p$ as ${-8.755604237, 1.827401007}$
But since $p$ is supposed to be an integer (and $q$) this would be the wrong answer to my question.
How could the answers be in such a way that $p$ and $q$ are integers?

Just do it.
$28 + p\sqrt{3}=(q+2\sqrt 3)^2 = q^2 +4q\sqrt 3 + 12$
$16 - q^2  = \sqrt 3(4q - p)$.
$16-q^2$ is an integer.  So is $4q -p$.  So $\sqrt 3\times (4q-p)$ is an integer.
Let $\sqrt 3(4q-p) = M$ then our first thought is $\sqrt 3 = \frac M{4q-p}$.  But thats impossible as $\sqrt 3$ is irrational.  
The only way this makes sense is if $4q - p = 0$ so $p=4q$.
So $16 -q^2 = \sqrt 3(4q -p) = 0$ so $q^2 = 16$ and $q = \pm 4$ and $p = \pm 16$.
