How to execute functions simultaneously in this case?

Which motor and driver are you using? Which stepper library?
Post your COMPLETE code.