If two binary forms represent the same prime they must be equivalent The following exercise appears on the book "Primes of the form $x^2 + n y^2$":

the lemma 2.3 mentioned on the hint is this:

I tried examining the middle coefficient $B$, but if $p = f(p_0, q_0) = g(p_1, q_1)$ none of the variables in $B$ is the same for the equivalent forms of $f$ and $g$ given by the lemma. So i have no idea about how to solve the item (a).
 A: this sort of thing becomes clear if you practice reducing forms by hand; finding equivalence is a step by step process. The modular group, "proper" equivalence, happens when repeating two steps to manipulate the form in a useful way. I like to use the notation $$ \langle A,B,C \rangle  $$ to denote the form $$ f(x,y) = A x^2 + B xy + C y^2 . $$ The matrix ($t$ is some integer)
$$
\left(
\begin{array}{cc}
1 & t \\
0 & 1
\end{array}
\right)
$$
leads to
$$ \langle A,B,C \rangle \mapsto \langle A,B + 2At,C +Bt +At^2 \rangle $$
The matrix 
$$
\left(
\begin{array}{cc}
0 & -1 \\
1 & 0
\end{array}
\right)
$$
leads to
$$ \langle A,B,C \rangle \mapsto \langle C,-B ,A \rangle $$
Gauss reduction is the process of beginning with a form, alternating these two steps ( each time the value of $t$ is chosen to minimize $|B|,$ if we are discussing a positive form).
For your part a, you begin with two forms, which are properly equivalent to
$$  \langle p,B,C \rangle $$
for fixed prime $p.$ Just apply the first step for each, 
$$ \langle p,B,C \rangle \mapsto \langle p,B + 2pt,C +Bt +pt^2 \rangle $$
Since we can add or subtract $2p$ to the middle term, we can demand 
$$  -p < B \leq p $$
for both.  What about the discriminant? Naming $B_1, C_1, B_2, C_2,$ we reach
$$ \Delta = B_1^2 - 4 p C_1 = B_2^2 - 4 p C_2 $$
This tells us that
$$ B_1^2 \equiv B_2^2 \pmod p  $$
as well as $B_1 \equiv B_2 \pmod 2$
I think I will stick to odd $p$ for now. The result is just
$$ B_2 \equiv \pm B_1 \pmod p $$  But since we arranged
$$  -p < B_j \leq p $$  and $p$ is odd, we actually have
$$ B_2 = \pm B_1  $$ There is a detail that we cannot have one of them $p$ and the other $0,$ as $p$ is odd but $0$ is even. And then $ \Delta = B_1^2 - 4 p C_1 = B_2^2 - 4 p C_2 $ tells us that $C_1 = C_2$
everything else matches. When $B_2 = - B_1,$ we get improper equivalence with the  matrix
$$
\left(
\begin{array}{cc}
1 & 0 \\
0 & -1
\end{array}
\right)
$$
which leads to
$$ \langle A,B,C \rangle \mapsto \langle A,-B ,C  \rangle $$
