Call the length of side C (= your X), and the heigth of the triangle

Then, using the known area of the triangle, and using the Pythagoras theorem

Substitute for in the second equation and then solve this as a quadratic in

(I calculate , or . But you should check these results.)

(And remember to double them for the length of C.)