Working with AccelStepper

As I am new to this can you show me an example of how to do this by modifing my code?

Thanks