Let the number of green fish = G
Then the number of yellow fish = G - 6
The total fish in the tank = G + G - 6 = 2G - 6
And 40% of these are yellow ....so....
Yellow fish G - 6
________ = ______ = .40 multiply both sides by 2G - 6
Total fish 2G - 6
G - 6 = .40 (2G - 6) simplify
G - 6 = .8G - 2.4 add6 to both sides.....subtract .8G from both sides
.2G = 3.6 divide both sides by .2
G = 18 fish are green