You need to assign variables to some things in this problem. Since you are dealing with lengths and areas (which are determine by the lengths) and because ultimately you need to know a length, it seems that the lengths of the wires are important. Lets make each length a variable - say x and y. If the total length is 5, can you come up with an equation relating x to y?

Also, what would be the length of a side of a square made out of the wire that's x cm long? What would be its area (in terms of x)? What would be the area of the square made from the y cm length? Can you come up with an equation relating these areas?

Once you have two equations dealing with these two variables, you should be able to solve them by one of the methods used to solve systems of equations. Substitution for example (solve both for y and the you know that these will equal each other since they both equal y).