Showing $\langle a,p,q\mid p^{-1}ap=a^2, q^{-1}aq=a^2\rangle$ is non-hopfian (from first principles).
Checking that $\psi$ is a homomorphism is routine: $p^{-1}ap = a^2 \Rightarrow p^{-1}a^2p = a^4$, so $\psi(p^{-1}ap) = p^{-1}a^2p = a^4 = \psi(a^2)$, and similarly $\psi(q^{-1}aq) = \psi(a^2)$. So $\psi$ is a homorphism.
Since $a = pa^2p^{-1} \in {\rm Im}(\psi)$, $\psi$ is an epimorphism.
The tricky bit is to show that $\psi$ is not injective.
Note that $\psi(pap^{-1}) = pa^2p^{-1} = a = qa^2q^{-1} = \psi(qaq^{-1 })$.
So if we could show that $pap^{-1} \ne qaq^{-1}$ (in $G$) then we would be done.
That follows from Britton's Lemma about HNN-extensions, but since they are asking you to prove it from first principles, I am guessing that ther emust be soem way of doing it directly without recourse to Britton's Lemma. Unfortunately I haven't figured out how to do that yet!
As already mentioned in my comment and in Derek's answer, the whole point is to prove that $w=pap^{-1}(qaq^{-1})^{-1}\neq 1$.
First a remark: since this element belongs to the kernel of a surjective endomorphism, it belongs to all finite index subgroups, and in particular to the derived (and even the second derived) subgroup. This is typically a reason for an element to discard too obvious proofs of its non-triviality.
1) The arguments given in my comment (using an amalgam decomposition) and in Derek's (using an HNN-decomposition) are quite similar (these point of views were essentially unified in Bass-Serre theory.
2) Let me provide another proof using the group $G$ of oriented self-homeomorphisms of $\mathbf{R}$; it is easier if this combinatorial stuff is not taken for granted. To show the non-triviality of $w$, it is enough to find three elements $p,q,a$ of $G$ satisfying the two relators, and such that $w(p,q,a)\in G$ is $\neq 1$.
Namely, write $a(x)=x+1$ and $p(x)=x/2$, so $p^{-1}\circ a\circ p=a\circ a$ while $p\circ a\circ p^{-1}(x)=x+\frac12$. Define $s(x)=x+\frac{\sin(2\pi x)}{2\pi}$. Then $s\in G$, $s$ commutes with $a$ but not with $c=p\circ a\circ p^{-1}$. Define $q=s\circ p\circ s^{-1}$. Then $q^{-1}\circ a\circ q=a\circ a$; moreover $p\circ a\circ p^{-1}\neq q\circ a\circ q^{-1}$ (since equality would mean that $s$ commutes with $c$).