Let's denote the length of the longer part as x cm.
According to the given information, the other part will have a length of (5 - x) cm.
When the longer part is bent into a square, each side of the square will have a length of x/4 cm, and the area of the square will be (x/4)^2 = x^2/16 square cm.
When the other part is bent into a square, each side of the square will have a length of (5-x)/4 cm, and the area of the square will be ((5-x)/4)^2 = (25 - 10x + x^2)/16 square cm.
It is given that the square formed by the longer part will have four times the area of the square formed by the other part. So we can equate the two areas:
x^2/16 = 4 * (25 - 10x + x^2)/16
Multiplying both sides of the equation by 16, we get:
x^2 = 4 * (25 - 10x + x^2)
Expanding the right side of the equation, we have:
x^2 = 100 - 40x + 4x^2
Rearranging the terms, we have:
3x^2 - 40x + 100 = 0
This is a quadratic equation. We can solve it using the quadratic formula:
x = (-b ± √(b^2 - 4ac)) / (2a)
For our equation, a = 3, b = -40, and c = 100. Substituting these values into the quadratic formula, we get:
x = (-(-40) ± √((-40)^2 - 4 * 3 * 100)) / (2 * 3)
x = (40 ± √(1600 - 1200)) / 6
x = (40 ± √400) / 6
Now, we can simplify further:
x = (40 ± 20) / 6
Using the positive root:
x = (40 + 20) / 6
x = 60 / 6
x = 10 cm
Therefore, the length of the longer part is 10 cm.