A chef got 5 bags of onions. The red onions came in bags of 3 and the yellow onions came in bags of 6. If the chef got a total of 18 onions, how many bags of each type of onion did he get?
?=bags of red onions
?=bags of yellow onions
you have to guess and check word problems