Explanation
Let x be some positive real number
x > 0
The bakery has 5x kilograms of flour and 3x kilograms of sugar.
The ratio 5x:3x reduces to 5:3 when dividing both sides by x.
5x+3x = 40 since this is the total amount of mix they started with.
That equation solves to x = 5
Let y be the extra amount of sugar added. We go from 15 kg of sugar to 15+y kilograms. The amount of flour stays the same.
The ratio of these two items is set to 2/5.
flour/sugar = 2/5
25/(15+y) = 2/5
25*5 = 2(15+y)
125 = 30+2y
2y = 125-30
2y = 95
y = 95/2
y = 47.5 kg of sugar must be added.
------------------
Let's check that claim.
We keep the 25 kg of flour the same.
15 kg of sugar bumps up to 15+47.5 = 62.5 kg
Then,
flour/sugar = 25/62.5 = 250/625 = (125*2)/(125*5) = 2/5
This leads to a ratio of 2:5
This proves the answer is correct.