Problem controlling two stepper motors with two potentiometers

So for a project I am trying to hook up two different stepper motors to two different potentiometers. Using various videos and webpages I have a set up that I thought would work correctly. The problem that I am running into if that both of my potentiometers are controlling both of my motors instead of one controlling one and the other controlling the other.

Here is the code that I am using.

int sensorPin2 = A5;    //puller motor
int sensorValue2 =0;

int sensorPin1 = A4;    //gearbox motor
int sensorValue1 =0;


void setup() {
  
  pinMode(8, OUTPUT);   //direction pin2
  pinMode(9, OUTPUT);   //step pin2
  digitalWrite(8, LOW);
  digitalWrite(9, LOW);

  
  pinMode(2, OUTPUT);   //direction pin1
  pinMode(3, OUTPUT);   //step pin1
  digitalWrite(2, LOW);
  digitalWrite(3, LOW);
}

void loop() {
  sensorValue2 = analogRead(sensorPin2);
  sensorValue2 = map(sensorValue2,0,1023,0,1500);
  digitalWrite(9, HIGH);
  delayMicroseconds(sensorValue2);
  digitalWrite(9, LOW);
  delayMicroseconds(sensorValue2);

  sensorValue1 = analogRead(sensorPin1);
  sensorValue1 = map(sensorValue1,0,1023,0,1000);
  digitalWrite(3, HIGH);
  delayMicroseconds(sensorValue1);
  digitalWrite(3, LOW);
  delayMicroseconds(sensorValue1);
}

My understanding of the code is that one controls one and the other controls the other. I don't see the problem in my code but it has to be there because I know that my setup is correct. Any thoughts or suggestions?

The problem is your use of "delay" functions. Don't. Study the Blink Without Delay example in the Arduino IDE to see how to avoid them. There is also this helpful post: http://forum.arduino.cc/index.php?topic=223286.0

The way the code is written the delays for one motor are also part of the loop for the other motor.

You need to control each motor with code similar to the second example in this Simple Stepper Code

The inervals you are using are potentially much too short. Your MAXIMUM interval is 1.5 millisecs which (because you have 2 in a loop) means a SLOWEST rate of 333 steps per second. However with the potentiometer at the quarter position that would increase to 1300 steps per second.

Start experimenting with much longer step intervals.

Post a link to the datasheet for your motor. What stepper motor driver are you using? What is the ouptut of your motor power supply (volts and amps) ?

...R Stepper Motor Basics