A particle moves along a straight line OX. At a time t (in seconds) the distance x (in metres) of the particle from O is given by x = 40 + 12t - t3 How long would the particle travel before coming to rest ?