Madelyn cut a 60-inch pipe cleaner into two unequal pieces, and then she used each piece to make a square. The sum of the areas of the squares was 117 square inches. Let x be the length of one piece. Write and solve an equation to represent the situation and find the lengths of the two original pieces.