how do u solve this math problem
A school is organizing a cookout where hotdogs will be served. The hotdogs come in small packs and large packs. Each small pack has 12 hotdogs and each large pack has 24 hotdogs. The school bought 3 more small packs than large packs, which altogether had 216 hotdogs. Determine the number of small packs purchased and the number of large packs purchased.