Showing $\langle a,p,q\mid p^{-1}ap=a^2, q^{-1}aq=a^2\rangle$ is non-hopfian (from first principles). According to a search on Approach0, this question is new to MSE.
Motivation for Study:
I'm doing some light reading of some notes by Miller on combinatorial group theory. Hopfian groups have just been defined. Whilst I've seen the term used countless times before now, I have not yet once played with it. So here goes . . .
The Details:
The following is the definition I'm working with.

Definition: A group $G$ is hopfian if whenever $G/N\cong G$, we have that $N$ is the trivial group.
Lemma: Any group $G$ is hopfian iff every epimorphism $\alpha: G\to G$ is an automorphism.

The proof of this Lemma seems elementary to me, so, with a few qualms, I'll leave it out.
The Question:

Question: (G. Higman) Show that the group $H$ with presentation
$$\langle a,p,q\mid p^{-1}ap=a^2, q^{-1}aq=a^2\rangle$$
is non-hopfian.

For extra credit to those that answer (but no promised bounty):

Complete the exercise from first principles, please; that is, without any fancy footwork, so as to make clear the concept of (not) being hopfian.

My Attempt:
My goal is to exhibit an epimorphism $\psi: G\to G$ that is not an automorphism.
Define $\psi$ by
$$\begin{align}
p &\mapsto p,\\
q &\mapsto q,\\
a &\mapsto a^2.
\end{align}$$
Would this work? I'm not sure of whether it's an epimorphism, let alone not an automorphism.
I have $$\psi(p)\psi(q)=pq\stackrel{?}{=}\psi(pq)$$ (because $\psi$ is defined on the generators, right? So the same must be for the $qp$ case; the $\psi(a^2)=\psi(a)\psi(a)$ case is trivial).
Moreover, I have, since $a^2p=pa$ by the first relation, that $$\psi(a)\psi(p)=a^2p=pa\stackrel{?}{=}\psi(ap);$$ the $\psi(aq)$ bit is similar.
What I'm struggling with is $\psi(p)\psi(a)=pa^2$ and so on.
Please help :)
Disclaimer:
I'm in hospital at the moment and so I'm on a break from my PhD. (I've been here a month now.) The above is just for fun and has little if anything at all, a priori, to do with my research.
 A: 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!
A: 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$).
