The base of a right prism is a right triangle. The lengths of the legs of the triangle are 3 meters and 5 meters. The volume of the prism is 30 cubic meters. Find the height of the prism