Irfan had 900 magnets of which 25% were star-shaped magnets. How many star-shaped magnets must he buy to increase the number of star-shaped magnets in his collection to 55%?

Out of 900 magnets, 25% are star-shaped, or 0.25 x 900 = <<0.25*900=225>>225 magnets.

To increase the percentage of star-shaped magnets to 55%, the total number of magnets must be multiplied by 55/100 = 0.55.
So Irfan needs a total of 900 x 0.55 = <<900*0.55=495>>495 magnets in his collection.
He already has 225 star-shaped magnets, so he needs to buy an additional 495 - 225 = <<495-225=270>>270 star-shaped magnets. Answer: \boxed{270}.

To solve this problem, we need to find out how many star-shaped magnets Irfan currently has and how many he needs to buy to reach his desired percentage.

Step 1: Calculate the number of star-shaped magnets Irfan currently has.
Given that Irfan had 900 magnets and 25% of them were star-shaped magnets, we can find out how many star-shaped magnets he currently has by multiplying 900 by 25% (or 0.25):
900 * 0.25 = 225

So, Irfan currently has 225 star-shaped magnets.

Step 2: Calculate the number of star-shaped magnets Irfan needs to buy.
Irfan wants to increase the number of star-shaped magnets to 55%. We can calculate the number of star-shaped magnets he needs to buy to reach this percentage by subtracting the current number of star-shaped magnets from the desired number.

Let's denote the number of star-shaped magnets he needs to buy as 'x'. The equation would be:
(225 + x) / (900 + x) = 55%

To solve for 'x', we can cross multiply:
(225 + x) * 100 = 55 * (900 + x)
22500 + 100x = 49500 + 55x
100x - 55x = 49500 - 22500
45x = 27000
x = 27000 / 45
x = 600

So, Irfan needs to buy 600 star-shaped magnets to increase the number of star-shaped magnets in his collection to 55%.