I do find it a hard concept to get my head around.
It's a very simple concept, really. Something happened (the led was turned on or off). Some time later, something else should happen (the led should be turned off if it's on or should be turned on if it's on). Is it time to make that change?
You have a very similar need. You have a motor that is not at full speed. At various times, you need to increase the speed. At some time, the motor is up to speed. At some time, the motor has been up to speed long enough.
Instead of trying to do the whole job at once. modify the code to do nothing more that declare some variables that will contain the times and speeds. Show what you come up with, and we'll either say yes, that's good, or spin you around, and send you off in a new direction (after explaining why).
Then, you can work on the next step.