A right triangle has leg $n$, hypotenuse $2n+6$, and perimeter $60$. Find the lengths of all sides. This problem comes from a Grade 11 math textbook in a section on solving quadratic functions by factoring. What follows is my attempt at a solution.

A right triangle has one leg, $n$ and a hypotenuse, $2n+6$. The challenge is to determine the lengths of all the sides, given that the perimeter is $60$.

I worked through this problem a few times with a student. Finally I suggested we step away from it. I decided to post it to this forum for everyone's feedback. As I progressed through the problem, a strange thing happened -- a solution emerged. As is often the case, slowing down and meticulously formulating a question is all that is needed to find a solution.Rather than include my attempt in the question body, I've added it as a solution below. 
 A: Let's correct your solution.  Following your notation, the other leg will have length $x$.  Since the perimeter is $60$,
\begin{align*}
x + n + 2n + 6 & = 60\\
x + 3n + 6 & = 60\\
x & = 54 - 3n
\end{align*}
By the Pythagorean Theorem,
\begin{align*}
x^2 + n^2 & = (2n + 6)^2\\
x^2 + n^2 & = 4(n + 3)^2\\
x^2 + n^2 & = 4(n^2 + 6n + 9)\\
x^2 + n^2 & = 4n^2 + 24n + 36\\
x^2 & = 3n^2 + 24n + 36\\
x^2 & =3(n^2 + 8n + 12)
\end{align*}
On the other hand, we know that 
\begin{align*}
x^2 & = (54 - 3n)^2\\
x^2 & = 9(18 - n)^2\\
x^2 & = 9(324 - 36n + n^2)\\
\end{align*}
Hence, 
\begin{align*}
3(n^2 + 8n + 12) & = 9(n^2 - 36n + 324)\\
n^2 + 8n + 12 & = 3(n^2 - 36n + 324)\\
n^2 + 8n + 12 & = 3n^2 - 108n + 972\\
0 & = 2n^2 - 116n + 960\\
0 & = n^2 - 58n + 480\\
0 & = (n - 10)(n - 48)
\end{align*}
giving $n = 10$ and $n = 48$ as possible solutions.  
If $n = 10$, then $2n + 6 = 26$, and $x = 54 - 3n = 24$.  As you can check, $(10, 24, 26)$ is a Pythagorean triple.
If $n = 48$, then $2n + 6 = 102$, and $x = 54 - 3n = -90$.  Since a side length cannot be negative, we reject this solution. 
You confused the roles of $x$ and $n$, which led you astray.
A: I've designated the other leg of the triangle, $x$.


*

*Given the perimeter, $$60=2n+6+n+x$$ $$54=3n+x$$ $$x=54-3n=-3(n-18)$$ $$x^2=9(n^2-36n+324)$$

*By Pythagoras, $$x^2+n^2=(2n+6)^2=4n^2+24n+36$$ $$x^2=3n^2+24n+36$$ $$=3(n^2+8n+12)$$

*Combining the above two results, $$=3(n^2+8n+12)=9(n^2-36n+324)$$ 
$$=(n^2+8n+12)=3(n^2-36n+324)$$
$$=3n^2-108n+972$$
$$0=2n^2-116n+960=n^2-58n+480$$ $$=(x-48)(x-10)$$


This leaves two so!utions, $x={10,48}.$ From here, $$54=3n+x_1 = 3n+10$$ $$n=\frac{44}{3}$$ $$2n+6 = \frac{106}{3}$$ Alternatively,  $$54=3n+x_2 = 3n+48$$ $$n=2$$ $$2n+6 = 10$$ The solutions for the sides are $$  10,
\frac{44}{3},  \frac{106}{3}$$ and $$48,2,10$$
A: 
Let the blue point be $n$ units above the origin, $n > 0$.
Construct a circle centred at the blue point with radius $2n+6$. Then by the intersecting chords theorem, by choosing the $x$- and $y$-axis as chords, $(2n+6+n)(2n+6-n) = x^2$. Hence the length of the other leg is $\sqrt{(3n+6)(n+6)} = \sqrt{3n^2 + 24n + 36}$.
Thus $n + 2n + 6 + \sqrt{3n^2 + 24n + 36} = 60$, then squaring both sides:
$$3n^2 + 24n + 36 = (60 - 3n - 6)^2$$
$$3n^2 + 24n + 36 = 2916 - 324n + 9n^2$$
$$6n^2 - 348n + 2880 = 0$$
$$n^2 - 58n + 480 = 0$$
$$(n - 10)(n - 48) = 0 \implies n = 10, 48$$
but when $n = 48$, the hypotenuse $2(48) + 6 > 60$, which is the perimeter. Hence only $n=  10$ is possible, which yields a $10-24-26$ right triangle.
