Schr\"odinger equation for two quasi-exactly solvable potentials