x - volume of 15% saline solution. Theres is 15% x = 0,15 x saline solution
y - volume of 40% saline solution. There is 40% y = 0,4y saline solution
You want to produce 10 mililiers so x+y= 10
And this saline has to be 30%, so you've got 30 % * 10 = 0,3 * 10 = 3 ml saline. So:
0,15x + 0,4y = 3
And you've got system of equations:

So answer:
Volume of 15% saline solution : 4 mililiters
Volume of 40% saline solution: 6 mililiters.