Solving 3D Inverse Problems using Pre-trained 2D Diffusion Models