In a music school, there were 112 more boys than girls. 5/8 of the boys and 40% of the girls took part in a performance. There were 15 fewer girls than boys who did not take part in the performance. How many students took part in the performance?

b = g+112

3/8 b = 3/5 g + 15
solve and then get b+g