Solving a univariable identity that satisfies the following relationship: 
Question: Consider the following equations:$$\begin{align*}1^2+2^2+2^3 & =3^2\\2^2+3^2+6^2 & =7^2\\3^2+4^2+12^2 & =13^2\\4^2+5^2+20^2 & =21^2\end{align*}$$
  State a one variable identity that is suggested by these examples.

Since the question asked for a uni-variable identity, I assumed the form$$(ax+b)^2+(cx+d)^2+(ex+f)^2=(gx+h)^2\tag1$$
And equated coefficients to get an undermined system. Namely,$$\begin{align*} & a^3+c^3+e^3=g^3\\ & ab+cd+ef=gh\\ & b^2+d^2+f^2=h^2\end{align*}$$
And solving for integer solutions (I set $(a,c,e,g)=(1,2,2,3)$ and solved the remaining system) to get$$(x+2)^2+(2x+4)^2+(2x+4)^2=(3x+6)^2$$
Which works for $x\in\mathbb{Z}$. However, the question asked for an identity that gave the examples listed above. Something my formula clearly isn't capable of.
So my actual question is simple: How would you go about solving this problem?

Notice that the $2$nd and $3$rd term are respectively $2,2$ then $3,6$ then $4,12$ then $5,20$.Now dividing the $3$rd with the second you get $1,2,3,4$ respectively you can guess that $3$rd term is $n$ times bigger then $2$nd and you can see that the $2$nd is $(n+1)$.Also the $4$th term is $3$rd minus one. 
Putting that together on has
$$n^2+(n+1)^2+(n(n+1))^2=(n(n+1)+1)^2$$
As given by S.C.B
