If a triangle has sides of length a, b, c, and C is the angle opposite side c, then the area of the triangle is . If a = b = 5 then the area is . The only way that two different triangles could have that same area is if is the same for both triangles. But that would mean that the two angles are supplementary: (or if you prefer degrees to radians).
Now use the cosine rule. You are told that one of the two triangles (say the one with angle ) has the third side equal to 4. The cosine rule says that . For the other triangle, with third side x and angle , the formula says . But and are supplementary, and so . Therefore . That's your quadratic equation. Now all you have to do is to solve it.