let甲校男生人數be w
let甲校女生人數be x
let乙校男生人數be y
let乙校女生人數be z
甲校學生人數是乙校學生人數的50%: (w+x) = 0.5(y+z) ... a
甲校女生人數是甲校學生人數的30%: x = 0.3(w+x) ... b
乙校男生人數是乙校學生人數的40%: y = 0.4(y+z) ... c
問: 兩校男生總數佔兩校學生總數的百分之幾 (w+y)/(w+x+y+z)
from b
x = 0.3w + 0.3x
0.7x = 0.3w
x = 3/7w
from c
y = 0.4y + 0.4z
0.6y = 0.4z
z = 3/2y
subsitute into a
(w+x) = 0.5(y+z)
w+3/7w = 0.5(y+3/2y)
10/7w = 5/4y
w=7/8y