Answer:
In the Beginning Ratio of the number of pineapple muffins to mango muffins =3:2
Let the the number of pineapple muffins and mango muffins be 3 k and 2 k.
Number of pineapple muffins sold = 144
New Ratio of the number of pineapple muffins to mango muffins is 3:5.
⇒

⇒5 × (3 k - 144) = 2 k × 3
⇒ 15 k - 720 = 6 k [ Using Distributive property: a × (b+ c) = a × b + a × c]
⇒15 k - 6 k = 7 20 [ Taking variable on one side and constant on another side of equation]
⇒9 k = 720
Dividing both sides by 9, we get
k = 80
So, Number of pineapple muffins which were present in the store when the bakery opened = 80 × 3 = 240