Derive equation of rectangle

Hi,

I have a triangle whose perimeter is 34cm. The diagonal is 13cm, and the width is cm. Derive the equation .

I attempted this, and this is what I did:

Using Pythagoras' theorem I knew that where is the height of the rectangle. Thus, the unknown must be which becomes , therefore the following should be true: . However as you can see it doesn't match the derivation given at the start. How wrong was my answer? Where do I go from here?

I would like to point out that this isn't homework.

Thanks for any help (Happy)