There would have been 24 pieces of cake. If the two people ate 9 pieces in total, and Mindy ate 3 pieces, that would mean that Troy ate 6 pieces of cake. If 6 pieces is 1/4 of the cake, and 6×4 is 24, there would have been 24 pieces of cake in total.