Let the mass of the 10 % solution be #xcolor(white)(l)"g"#.

Then the mass of the 20 % solution is #(500 - x)color(white)(l) "g"#.

We have the relation

#"mass of solute in 10 % solution" + "mass of solute in 20 % solution" = "mass of solute in 17.5 % solution"#

#x color(red)(cancel(color(black)("g"))) × 10 color(red)(cancel(color(black)(%))) + (500 - x) color(red)(cancel(color(black)("g"))) × 20 color(red)(cancel(color(black)(%))) = 500 color(red)(cancel(color(black)("g"))) × 17.5 color(red)(cancel(color(black)(%)))#

#10x + 20(500 - x) = 500 × 17.5#

#10x + "10 000" - 20x = 8750#

#10 x = 1250#

#x = 1250/10 = 125#

You must add 125 g of the 10 % solution to 375 g of the 20 % solution.

**Check:**

#"125 g"× 10 % + "375 g" × 10 % = "500 g" × 17.5 %#

#"12.5 g + 37.5 g = 50 g"#

#"50 g = 50 g"#

It checks!