B represents the Base Area of a pyramid. The Volume is one third times base times height. Because the Volume of Pyramid occupies 1/3 of a prism-like in the picture below.
This is valid not only for the right pyramids but also for every other cases: Regular Pyramid, Oblique Pyramid.