Let [tex]x[/tex] be the amount (in L) of the 40% solution to be used, and [tex]y[/tex] the amount (L) of the 20% solution. The chemist wants a new solution of 50 L, so that
[tex]x+y=50[/tex]
Each L of the 40% solution contributes 0.4 L of salt, while each L of the 20% solution contributes 0.2. The new solution should have a concentration of 25% salt, so that
[tex]0.4x+0.2y=0.25(x+y)=12.5[/tex]
Now
[tex]x+y=50\implies y=50-x[/tex]
[tex]0.4x+0.2y=12.5\implies0.4x+0.2(50-x)=12.5\implies0.2x=2.5[/tex]
[tex]\implies\boxed{x=12.5}\implies\boxed{y=37.5}[/tex]