An elementary approach to the inviscid limits for the 3D Navier-Stokes equations with slip boundary conditions and applications to the 3D Boussinesq equations