How to controll a servo with 5 wires?

No - you really only need three for a simple windowing servo control. I'll give you a better pseudo-code implementation in a bit...

Yes - but to avoid shoot-through, you should always set the LOW then the HIGH; ideally, you set both LOW first.

Well - you only need to set one pair of the transistors HIGH and the other pair LOW - so two pins (and if you are having this question, yet you somehow built an h-bridge using transistors, I sincerely have to question your capability to handle the task as a whole; I mean, if you are building discrete component h-bridges - you should -know- how many pins you need for any configuration).

Ok - pseudo-code time. Remember I posted this as the algorithm:

A. Read potentiometer.
B. Compare reading with set-point (where you want it to be).
C. If reading is greater than the set-point plus some window value (deadband), turn motor in direction that will decrease reading.
D. If reading it less than the set-point minus some window value (deadband), turn the motor in the direction that will increase reading.
E. Goto A

Ok - here is the Arduino implementation of it (note: I have coded this "blind" and I am -not- claiming this code compiles or even works properly, but it should give you an idea of what is going on):

int motorPinA = 9; // should be whatever you need them to be
int motorPinB = 10;

int potPin = 0;

int dbWindow = 32; // deadband of 32 units on either side of "setPoint"

void motorStop() {
  digitalWrite(motorPinA, LOW);
  digitalWrite(motorPinB, LOW);

  delay(100); // wait for motor to stop; may not be needed
}

void motorCCW() {
  motorStop();

  digitalWrite(motorPinA, LOW);
  digitalWrite(motorPinB, HIGH);
}

void motorCW() {
  motorStop();

  digitalWrite(motorPinB, LOW);
  digitalWrite(motorPinA, HIGH);
}

int readPot() {
  return analogRead(potPin);
}

void positionServo(int setPoint) {
  int curPoint = readPot();

  if (curPoint > setPoint + dbWindow) {
    motorCCW();
  }

  if (curPoint < setPoint - dbWindow) {
    motorCW();
  }
}

void setup() {
  Serial.begin(9600);

  pinMode(motorPinA, OUTPUT);
  pinMode(motorPinB, OUTPUT);

  motorStop();
}

void loop() {
  // somewhere in here we get the position value for
  // the servo, but for now, we'll just fake it
  int setPoint = 512; // "center" value for the servo

  positionServo(setPoint);
}

Something to keep in mind about the above code is that it is constantly polling the analog input for the servo position - so if the position is shifted by an outside force (and the value falls outside the deadband) then it will shift back properly, like a servo should (that is, it will attempt to "hold" a position).

You can increase or decrease the deadband depending on the accuracy of the potentiometer, the needed degree of precision for positioning, and the speed of the movement - just don't decrease it too much, or the servo will constantly hunt (or rotate to the end-stops and mechanically fail or something). If you find you can't make it accurate enough with this system, then it might be rotating too fast or something, and you'll need to implement a PID controller or something similar to allow you to accelerate and decelerate the motor as it nears the set position.

There are likely better ways to implement this code, but what is there shows the basics.