The side length of one square would be X, then the side of the second square would be 2X ( twice as long as the first one.)
Area of a square is side x side
The area of the first square would be x times x which becomes x^2.
The area of the second square would be 2x x 2x , which becomes 4x^2.
Now the sum of the two equals 45.
Now you have x^2 + 4x^2 = 45
Simplify to get:
5x^2 = 45
Divide both sides by 5:
x^2 = 45/5
x^2 = 9
Take the square root of each side:
x = √9
x = 3 cm.
The first square has side length x = 3 cm.
The second square was 2x = 2 *3 = 6 cm.