what is the ratio of 54 colored m&M's with 8 of them being green and 9 of them being blue. Need answer on how you come up with answer

Which ratio are you looking for? Green to total? Green to blue? Blue to total? Other colors to total or green or blue?

Green to total = 8/54

If you want another ratio, use the same principle.