Ok, i'll try to explain^^
A ratio 1:4 means that for x red paint, you will have 4x white paint.
This means that for 1 liter of red paint, you will have 4 liters of white paint. The total is 5 liters.
Now, you're looking for x such as x+4x make 40mL of pink paint.
-> x=... ? quantity of red paint
-> 4x=... ? quantity of white paint