how many flowers do I have if...1/4 are pink...2/5 of remaining flowers are red...18 are yellow

X = Total # of flowers.

Pink = X/4 Flowers.
Bal. = X - X/4 = 3x/4

Red = 2/5 * 3x/4 = 6x/20=3x/10 Flower.

Yellow = 18

X/4 + 3x/10 + 18 = X
Multiply both sides by 20:
5x + 6x + 360 = 20x
11x - 20x = -360
-9x = -360
X = 40