i believe u r confused about the 5 tanks because 18 can not fit into 5. so here is what it would accurately be.
to find out how many tanks you need your going to need to find the least common multiple. the least common multiple for both are below
18: 1, 2, 3, 6, 9, 18
24:1, 2, 3, 4, 6, 8, 12, 24
the least common multiple is 3. you will need three tanks. now for part b of this equation, to find out how many of each need to be put into the tank. to find this out you need to divide 18 plant and 24 fish by 3 tanks.
18/3 = 6
24/3 = 8
6 plants will go in each tank and 8 fish will go in each tank
the ratio is 6:8 per tank