Merging Two Codes?

I was wanting to use a sketch to run 2 motors at random speeds about 2 sec delay from each in one direction and at the same time do other things such as turn on and blink a led depending on if a sensor is reading I/O. Thanks for the help so far

Sincerely,

Matthew