Please help me, i dont know how or what to do

From the given figure
There is a right triangle whose legs are x and 99, its hypotenuse is (x + 81)
By using the Pythagorean theorem
[tex]\begin{gathered} x^2+99^2=(x+81)^2 \\ x^2+9801=(x)(x)+(x)(81)+(x)(81)+(81)(81) \\ x^2+9801=x^2+81x+81x+6561 \end{gathered}[/tex]Add the like terms on the right side
[tex]x^2+9801=x^2+162x+6561[/tex]Subtract x^2 from both sides
[tex]\begin{gathered} x^2-x^2+9801=x^2-x^2+162x+6561 \\ 9801=162x+6561 \end{gathered}[/tex]Subtract 6561 from both sides
[tex]\begin{gathered} 9801-6561=162x+6561-6561 \\ 3240=162x \end{gathered}[/tex]Divide both sides by 162
[tex]\begin{gathered} \frac{3240}{162}=\frac{162x}{162} \\ 20=x \end{gathered}[/tex]The value of x is 20