Final answer:
There are 3 yellow sweets and 6 purple sweets in the packet.
Step-by-step explanation:
The ratio of yellow to purple sweets in the packet is 2:1. If there are 9 sweets in total, we can set up the proportion:
2(x) = 1(9 - x)
Where x represents the number of yellow sweets and 9 - x represents the number of purple sweets. Simplifying the equation:
2x = 9 - x
3x = 9
x = 3
Therefore, there are 3 yellow sweets and 9 - 3 = 6 purple sweets in the packet.