Exact wave function of a harmonic plus an inverse harmonic potential with time-dependent mass and frequency