You are giving me too much credit (in addition to several hints). I did not see that large square could have sides = x and still have same area for the triangle until just now. This is an interesting problem.
I am surprised that my square root approach did not yield a result closer to the correct answer. The approach is correct, I think, although I needed to know that the larger square is 5x5. I used the fact that if you know three sides of a triangle you can calculate the area using Heron's formula. I found the length of each side using Pythagoras, which resulted in all the square roots.