Count the number of cubes in the first layer.
There is 16 cubes in the first layer.
Now divide the total number of cubes by the cubes per layer:
48 cubes / 16 cubes per layer = 3 layers.