Help with motor code

This is the code that I am using to run my stepper motors:

#include <Stepper.h>

const int stepsPerRev = 513; // steps per rev
const int speedRpm = 5; // speed rpm

Stepper stepper1(stepsPerRev, 10, 8, 9, 11);
Stepper stepper2(stepsPerRev, 6, 4, 5, 7);

void setup() {
// set speed
stepper1.setSpeed(speedRpm);
stepper2.setSpeed(speedRpm);
}

void loop() {
// step one revolution in one direction:
stepper1.step(stepsPerRev);
stepper1.step(-stepsPerRev);
stepper2.step(stepsPerRev);
stepper2.step(-stepsPerRev);
delay(100);
}

But when I run it one motor runs and then stops and then the other one goes and then stops and they only run one at a time. I know that this is because arduino runs its code line by line, but i need help making them run at the same time. Anything will help!
Thanks!

but i need help making them run at the same time.

You need to look at AccelStepper or MultiStepper, then. The Stepper library can only move one stepper at a time.

You can make them appear to move simultaneously:

void loop() {
  // step one revolution  in one direction:
  for (int i=0; i<stepsPerRev; i++) {
    stepper1.step(1);
    stepper2.step(1);
  }
  for (int i=0; i<stepsPerRev; i++) {
    stepper1.step(-1);
    stepper2.step(-1);
  }
  delay(100);
}