ratio of boys to girls = 4:3
let
x= total number of student
[tex]\begin{gathered} n\text{umber of boys = }\frac{4}{7}x \\ n\text{umber of girls =}\frac{3}{7}x \\ \text{If there are 20 more boys and 12 less girls} \\ \frac{2}{3}\times(x+8)=\text{boys} \\ \frac{1}{3}\times(x+8)=\text{girls} \\ \text{boys}=\frac{2}{3}x+\frac{16}{3} \\ \text{girls}=\frac{1}{3}x+\frac{8}{3} \\ \\ \frac{4}{7}x+20=\frac{2}{3}x+\frac{16}{3} \\ \frac{4}{7}x-\frac{2}{3}x=\frac{16}{3}-20 \\ \frac{12x-14x}{21}=\frac{16-60}{3} \\ \frac{-2x}{21}=\frac{-44}{3} \\ -6x=-924 \\ x=\frac{-924}{-6} \\ x=154 \end{gathered}[/tex]Total student in the class = 154