According to the topic, we can get the equation 7a/(3a+ 104)=5/4.
It can be concluded that A is 40 yuan.
So Class A is 280 yuan and Class B is 120 yuan.
After all this time, you still have some math skills.