2х+4*(40-х)=100 4х+2*(40-х)=100
2х+4*(40-х)=100
2x+160-4x=100
-2x=-60
x=30
4х+2*(40-х)=100
4x+80-2x=100
2x=20
x=10