Question 966284
Let me give just part of the process but not much of the solution process:

Assign variables for side length of the square, the length of the rectangle, and the width of the rectangle.  List your equations using the variables.   Form your system of equations, and solve the system.


As a beginning,
q, the side length of the square
x, the length of the rectangle'
y, the width of the rectangle


Use the description to form expressions and equations...