7/5=s/g multiply both sides by g
7g/5=s multiply both sides by 5/7
g=5s/7
We are then told that:
g+30=s-30 subtract 30 from both sides
g=s-60, and from earlier g=5s/7, and g=g so we can say:
s-60=5s/7 multiply both sides by 7
7s-420=5s subtract 5s from both sides
2s-420=0 add 420 to both sides
2s=420 divide both sides by 2
s=210, and since g=s-60
g=150
So Simon had 210 pencils and Greg had 150 pencils.
Check..
s:g=210:150=7:5
and
s-30=g+30
210-30=150+30
180=180