<s>[INST] If $p$, $q$ are naturals, solve $p^3-q^5=(p+q)^2$. In If $p,q$ are prime, solve $p^3-q^5=(p+q)^2$., the author asks to solve the equation $p^3-q^5=(p+q)^2$ for primes $p$ and $q$. A proof is given that $p=7, q=3$ is the only solution.
In this "followup", I would like to ask for a proof that does not depend on $p$ and $q$ being primes but allows arbitrary positive integers.
I do have an elementary proof for the case in which $p$ and $q$ are relatively prime, but the case in which they aren't is giving me a hard time. Anyone here who can help?
9/12 update:
As I commented, I may have been wrong when I claimed I had a proof for the case where $p$ and $q$ are relatively prime, but it should be possible to prove with the additional condition $(p,q+1)=1$ (not $q-1$ as I had written in the comment). Here's the proof:
Assume that $p$ and $q$ are positive integers such that
$$p^3-q^5=(p+q)^2\text{,}\tag{1} $$
$$(p,q)=1,\tag{2}$$
$$(p,q+1)=1.\tag{3}$$
Note that (1) implies that
$$q<p.\tag{4}$$
Evaluating (1) modulo $q$ gives $p^3\equiv p^2\pmod{q}$, so by (2), $p\equiv1\pmod{q}$, i.e. there exists $a\in\mathbb{N}$ such that 
$$p=aq+1.\tag{5}$$
Likewise, if we evaluate (1) modulo $p$, we get $-q^5\equiv q^2\pmod{p}$, so $p$ divides 
$q^5+q^2=q^2(q+1)(q^2-q+1)$ and thus by (2) and (3),
$$p\;|\;q^2-q+1.\tag{6}$$
Combining (5) and (6), we get that $p$ divides $q^2-q+1-aq-1=q(q-a-1)$ and therefore by (2),
$$p\;|\;q-a-1\tag{7}.$$
Note that, since the right-hand side in (6) is positive, $q-a-1$ must not be negative. On the other hand, (4) implies that it cannot be positive either, so it is $0$ and we have $a=q-1$ and therefore
$$p=q^2-q+1.\tag{8}$$
Now, substituting (8) in (1) and evaluating modulo $q^2$ gives $-3q+1\equiv1\pmod{q^2}$, i.e. $q^2$ divides $3q$ which forces $q=3$ and $p=7$.
 [/INST] I came up with a solution for $\gcd(p, q)=1$. Note that $p>q$. Looking mod $p$ gives $q^2(q^3+1) \equiv 0 \pmod p$, thus $p|q^3+1$. Take modulo $q$ of both sides of the equation to get $p^2(p-1) \equiv 0 \pmod q$, hence $q|p-1$. So we have $p=qr+1$ for some positive integer $r$. It follows that$$p|q^3+1-p=q^3-qr=q(q^2-r)$$Hence there is some non-negative integer $s$ for which $q^2-r=sp=s(qr+1)$ and consequently$$q^2-rsq-(r+s)=0$$In order to get integer values for $q$ discriminant of this quadratic must be a perfect square, but notice that if $r>1$ and $s>1$ $$(rs)^2<r^2s^2+4(r+s)<(rs+2)^2$$and we must have $r^2s^2+4(r+s)=(rs+1)^2$, which leads to$$r=\frac{4s-1}{2s-4},$$Which is never an integer. Contradiction. Therefore, we must have $r =1$ or $s \le1$. 
$r=1$ gives $p=q+1$ and equation becomes $(q+1)^3-q^5=(2q+1)^2$. One can simplify this and get $-q^4+q^2-q-1=0$, so $q|1$ and $q=1$, which fails to satisfy equation.
$s=0$ gives $p=q^3+1$ and equation becomes $(q^3+1)^3-q^5=(q^3+q+1)^2$. So $q$ divides the constant term of polynomial equation, that is $q|2$, and $q=1, 2$, which again fail to satisfy equation.
$s=1$ gives $p=q^2-q+1$ and equation becomes $(q^2-q+1)^3-q^5=(q^2+1)^2$. So $q$ divides the constant term of polynomial equation, that is $q|3$, and $q=1, 3$. $q=1$ fails to satisfy equation. $q=3$ satisfies the equation and gives $p=7$. Therefore $(p, q)=(7, 3)$ is the only solution when $\gcd(p, q)=1$.
</s>