Induced Brownian motion by the Friedmann–Robertson–Walker spacetime in the presence of a cosmic string