How to prove that this diophantine equation has only two solutions? Consider an equation of the form.
$$z^3=y^2+4$$
where z ,y $\in \Bbb N$
Hence, the solution of form (z,y) are (2,2) and (5,11).
So How to prove that this diophantine equation only has these two solutions.

Suppose $z^3=y^2+4 = (2-yi)(2+yi)$, if the two factors $2-yi$ and $2+yi$ are coprime, then $(u+vi)^3 = 2+yi$, and the rest is easy. However, they need not be coprime, a more comprehensive analysis is necessary.

Let us first assume $z$ is even, letting $z=2z_1,y=2y_1$ gives $2z_1^3 = y_1^2+1$. Modulo $4$ shows that $z_1$ must be odd. Write $2z_1^3 = (y_1+i)(y_1-i)$. The two factors on the right cannot be coprime, since LHS is divisible by $2$ but not divisible by $4$. Let $a$ be their GCD, then $a|2$. Obviously $a$ cannot be $2$, so $a = 1+i$, a Gaussian prime factor of $2$. Therefore
$$z_1^3 = \frac{y_1+i}{1+i} \frac{y_1-i}{1-i} = \frac{(y_1-1)+(y_1+1)i}{2}\frac{(y_1-1)-(y_1+1)i}{2}$$ Now two factors on the right are coprime, let $(u+vi)^3 = \frac{(y_1-1)+(y_1+1)i}{2}$, equating real and imaginary part and cancel $y_1$ gives $$-1 = (u+v)(u^2-4uv+v^2)$$ Hence $$\begin{cases}u+v = -1 \\ u^2-4uv+v^2 = 1 \end{cases} \quad \text{or} \quad \begin{cases}u+v = 1 \\ u^2-4uv+v^2 = -1 \end{cases}$$ Only the first case yields integral solution: $(u,v)=(-1,0)$ or $(0,-1)$. Hence plugging back gives $y_1 = \pm 1, z_1 = 1$. This gives the solution $y=\pm 2,z=2$.

If $z$ is odd. Assume $a|(2-yi), a|(2+yi)$, then $a|4$. So $a = 1,1+i,2$ or $4$. But only $a=1$ is possible, because $z^3 = (2-yi)(2+yi)$ and $z$ is odd. Hence $(2+yi) = (u+vi)^3$, which gives $(u,v) = (-1,\pm 1)$ or $(2,\pm 1)$. The first case is ruled out since $z$ is odd. The second case gives a new solution $y=\pm 11, z=5$.
