Question 242953
First we lay out the problem from what is given:

a = amount contributed by class 'a'

b = amount contributed by class 'b'

a + b = 127

We also are told that 2/3b is $7 more than a.  We can adjust by adding $7 to 'a' or subtracting $7 from 2/3b.  I'll do the latter.

a = 2/3b - 7

The original equation is:  a+b=127.  But we know that 2/3b is $7 more than the value 'a' ought to be, so subtract 7 from both sides:

2/3b + b = 120

Multiply both sides by 3 to remove the fraction and then collect terms:

3(2/3b + b) = 3(120)

2b + 3b = 360

5b = 360

Now divide both sides by 5:

b = 72

Now recall that a+b=127, so we can solve for a:

a = 127 - 72 = 55

We have our answer:
a = 55
b = 72

But we need to check our work!

Does a+b = 127?  55+27=127.  Yes it does.

What is 2/3 of b?
2/3b = 48

Is $48 really $7 short of 55?  Yes.

Done.