An art studio purchased a triangular plot of land in a town and constructed a new building whose base is in the shape of a right triangle. The two legs have lengths of xminus1 feet and xplus6 feet. The hypotenuse is 2xminus25 feet. Find the lengths of the three sides.