For this problem, we can use the relation
#color(blue)(bar(ul(|color(white)(a/a) c_1V_1 = c_2V_2 = "amount of solute" color(white)(a/a)|)))" "#
Let the #"volume of 90 % acid" = xcolor(white)(l) "L"#
Then, after mixing, we have #(6 + x") L of 40 % acid"#.
This is made up of #"6 L of 15 % acid"# and #xcolor(white)(l) "L of 90 % acid"#.
#"Moles before = moles after"#
#c_1V_1 = c_2V_2 + c_3V_3#
#40 color(red)(cancel(color(black)(%))) × (6 + x) color(red)(cancel(color(black)("L"))) = 15 color(red)(cancel(color(black)(%))) × 6 color(red)(cancel(color(black)("L"))) + 90 color(red)(cancel(color(black)(%))) × x color(red)(cancel(color(black)("L")))#
#240 + 40x = 90 + 90x#
#50x = 150#
#x = 150/50 = 3#
So, we add #"3 L of 90 % acid"# to #"6 L of 15 % acid"# and get #"9 L of 40 % acid"#.
Check:
#3 × 90 + 6 × 15 = 9 × 40#
#270 + 90 = 360#
#360 = 360#
It checks!