x= 2 bed rooms
y= 3 bed rooms
Adding x+y will equal the total number of rooms (40). Multiplying (2 beds * the number of 2 bed rooms) and (3 beds * the number of 3 bed rooms), and adding those together, will equal the total number of beds (92).
x+y= 40 rooms
2x+3y= 92 beds
Solve for one variable in equation one and substitute it in equation two.
Solve for one variable:
x+y= 40
Subtract y from both sides
x= 40-y
Substitute (40-y) in for x in equation two:
2x+3y= 92
2(40-y) +3y= 92
80-2y+3y=92
Subtract 80 from both sides
y= 12 three bed rooms
Substitute 12 in for y in either equation:
x+y= 40
x+12= 40
x= 28 two bed rooms
Check work:
2x+3y= 92
2(28)+3(12)= 92
56+36= 92
92= 92
Hope this helps! :)