I can't seem to figure out this word problem that involves factoring. Here is the question and what I have so far:

"The side of a square equals the width of a rectangle. The length of the rectangle is 6cm longer than its width. The sum of the areas is 176cm^2. Find the length of the side of the square."

I'm not sure whether there are two separate equations in this equation.

s = side of square

w = width of rectangle

area of square = (w)(length)

w = s

length of rectangle = ( w + 6)

area of rectangle = w(w+6)

I've tried pull all in a single equation which isn't. Any advice on how to solve this?