This is more explained solution for your understanding. You can remove whatever is unnecessary. All the best.
SOLUTION
let x equal the number of benches.
let y equal the number of students.
when there are 4 students to a bench, then there are 3 benches left over.
this means that y = 4x - 12.
that formula states that the number of students is equal to 4 times the number of benches - 12 students.
the 12 students that are subtracted are the 4 students per bench for the 3 benches that are empty.
when there are 3 students to a bench, then there are 3 students left over.
this means that y = 3x + 3.
that formula states that the number of students is equal to 3 times the number of benches plus 3 students.
the 3 students that are added are the 3 students that could not fit on any of the benches because there were only 3 students per bench.
you have 2 equations that need to be solved simultaneously.
they are:
y = 4x - 12
y = 3x + 3
in the second equation, substitute 4x - 12 for y and you get:
4x - 12 = 3x + 3
solve for x to get x = 15.
the number of benches has to be 15 if the calculations were done correctly.
with 4 students per bench, you get 4 * 15 = 60 students.
since 3 of the benches were empty, you have to subtract 3 * 4 = 12.
you get 60 - 12 = 48 students.
with 3 students per bench, you get 3 * 15 = 45 students.
since 3 of the students couldn't fit on any of the benches, you have to add 3 students to the total.
you get 45 + 3 = 48 students.