those fishes will be fine in a 10g tank. The 1 inch per gallon rule is an old method of working out how many fish you can keep in a volume of water. Unfortunately it doesn't take into account body mass and species type. eg: an established 10g tank can hold 20 neon tetras without any trouble, however, it is too small for a 6 inch oscar.