The perimeter of the rectangle is $20$, diagonal is $8$ and side is $x$. Show that $x^2-10x+18=0$ My friends recently took a Maths GCSE. In the paper, they came across a very difficult question which we spent a full half-hour train journey trying to figure out. We didn't manage it, so I've come here hoping you can help us out.

Here is the question:



The perimeter of the rectangle is 20.
Show that $x^2-10x+18=0$

Sorry for my appalling rectangle drawing skills. Drawing with Paint is like trying to staple an apple to your face. Painful and difficult.
Consider one triangle formed when diagonal is drawn. Let $x$ be one of the sides, other side will be $10-x$

$(10-x)^2+x^2=k^2$ 

$10^2+2x^2-20x=k^2$ , Looking at the expression $k$ looks like $8$. So, $36+2x^2-10x=0$
Name one side $y$. 

$2x+2y=20$ therefore $x+y=10$ and $y=10-x$

By the Pythagorean Theorem,

$(10-x)²+x²=8²$ and therefore 

$2x²-20x-100=64$, 

$2x²-20x+36=0$,

$x²-10x+18=0$