When three people are transferred from Class B to Class A, Class B now has x-3 people and Class A now has (X-3) 4/5. At this time, Class A has three more people than before, from which an equation about the number of class A can be listed.
(x-3) 4/5 = 5/7x+3 and x=63, so there are 5/7 63 = 45 people in Class A.