Consider the equation $$\frac{g_2}{(g_1 + 2g_2)^2} = \frac{h_2}{(h_1 + 2h_2)^2}$$ Does this equation have any solutions over $\mathbb{N}$ which satisfy $g_2 \neq h_2$? I tried using MATLAB and got no such solutions, but apart from not being sure that I did it correctly, I would prefer a proof just to be sure.
For those interested: I got this equation from an interesting problem in graph theory, which asks if a graph $G$ is determined (up to isomorphism) by the sequence $\varphi(G)$ (which is indexed by the set of all connected graphs) with $$\varphi(G)_F = \frac{\operatorname{Sub}(F, G)}{|G|^{|F|}}$$ where $\operatorname{Sub}(F,G)$ denotes the number of subgraphs of $G$ isomorphic to $F$. If I am correct, the conjecture holds for connected graphs and in general for all graphs whose largest connected component is of size at least $3$, however it is not true for nonempty graphs with no edges (any two such graphs have the same image under $\varphi$). The equation now arises when studying the remaining case, i.e. graphs which are disjoint unions of arbitrarily many copies of $K_1$ and $K_2$. If we set $G = g_1 K_1 + g_2 K_2$ and $H = h_1 K_1 + h_2 K_2$, then $G \cong H$ holds precisely when $(g_1, g_2) = (h_1, h_2)$. Thus, the conjecture does not hold for such graphs iff the equation in question has such solutions.
For the Diophantine equation.
$$\frac{x}{(y+2x)^2}=\frac{z}{(q+2z)^2}$$
You can record these decisions.
$$x=ks^2$$
$$y=ns$$
$$q=p(n+2(s-p)k)$$
$$z=kp^2$$