The easiest way to find the ratio of any comparison is to divide the larger number by the smaller number.
In this case, there are 21 goldfish and 7 tetra fish. Because it asks for the ratio of goldfish to tetra fish (the order DOES matter), you would divide 21 by 7.
21 (goldfish)/7(tetra)=3 (ratio of goldfish)
Because there are only 7 tetra, the ratio of tetra would be 1.
Going back to the order of the fish, the ratio of goldfish to tetra fish would be 3:1.
I hope I was able to help. Best of luck!