here since you have the area of a face you can find the length of the sides as in A you already know that the left and right sides of the face are 5cm and since area is length x width so 60/5 is 12 for the top and bottom sides.
now its easy to calculate volume as its length x width x height which will be 5x5x12 which is 300.
you can also just do 60x5 which will give the same answer i just wanted to explain the process.
same goes for B but with different numbers.
hope this helped