Since two of the quantities are squares and the sum of all of three is equal 21, then the possible values of those two quantities are: 1,4,9,16
Let's consider each possibility
1 and 4
21-1-4=16, but 16 is also square and there can be only two square so NO
1 and 9
21-1-9=11, but 11 is prime, so NO
1 and 16
21-1-16=4... 4 is a square ,so NO
4 and 9
21-4-9=8 , 8 is not prime and not a square, so YES
4 and 16
21-4-16=1, but 1 is a square ,so NO
9 and 16
9+16=25>21 so.. NO
Therefore, the amounts in the first three bowls are 4,8,9.