because Morgan can paint a room in 10 hours, she can paint 1/10 of a room in 1 hour, and sophia can paint 1/4 of a room in 1 hour, so 2(x/10+y/4)=y/10+x/4=1. simplifying, we get 4x+10y=2y+5x=20, and we can split that into 2x+5y=10 and 2y+5x=20. now we can just solve:
2x+5y=10
2y+5x=20
2y+4x/5=4
2y+5x=20
21x/5=16
x=$\boxed{\frac{80}{21}}$
160/21+5y=10
5y=50/21
y=$\boxed{\frac{10}{21}}$
.