How to modify the below code that the motor works (Turns on) for tamount of time

Hi and I exactly tried to do this and I put // in front of any thing like that but the faced with compiling problem.

Regards