Using the transient trajectories of an optically levitated nanoparticle to characterize a stochastic Duffing oscillator