<s>[INST] solving rectangle Diagonal of a rectangle is $13$ cm. If we extend the length of the rectangle for $4$ cm and width for $7$ cm, then diagonal will be longer for $7$ cm as well. Find sides (length and width) of the rectangle.
So $d^2=a^2+b^2 \implies b^2=d^2-a^2 \implies b^2=13^2-a^2 \implies b^2=169-a^2$ and $a^2+b^2=169$
\begin{align*}
d'^2 & =a'^2+b'^2\\
(d+7)^2 & =(a+4)^2+(b+7)^2\\
20^2 & = a^2+8a+16+b^2+14b+49\\
400 & = 8a+16+14b+49+169\\
\frac{166}{2} & = \frac{8a+14b}{2}\\
83 & =4a+7b
\end{align*}
... 
That's what I've done. What should I do next?
 [/INST] You can substitute in $a=\sqrt{169-b^2}$ and do the algebra. I don't think the numbers will be very pretty.
</s>