So, you're dealing with two salt of different .
Start by calculating how much salt you get in the 400-g sample of the 10% solution.
$m_"salt"/m_"solution" * 100 = 10%$
$m_"salt" = (10 * m_"solution")/100$
$m_"salt" = (10 * 400)/100 = "40 g salt"$
Now, let's say that the mass of the 20% solution needed is equal to $x$ grams. SInce this solution has 20 g of salt for every 100 g of solution, you can say that
$xcolor(red)(cancel(color(black)("g solution"))) * "20 g salt"/(100color(red)(cancel(color(black)("g solution")))) = 20/100x = x/5" g salt"$
The taol mass of the salt in the target 12% solution will be
$m_"salt" = 40 + x/5$
The total mass of the target solution will be
$m_"sol" = 400 + x$
This means that you can write
$((40 + x/5)"g salt")/((400 + x)" g solution") * 100 = 12%$
Rearrange and solve this equation for $x$ to get
$(40 + x/5) * 100 = 12 * (400 + x)$
$4000 + 20x = 4800 + 12x$
$8x = 800 => x = 800/8 = color(green)("100 g")$
This means that if you add 100 g of the 20% solution to 400g of the 10% solution, you will get 500 g of a 12% salt solution.