Two servo pins doesn't work at the same time

Your problem is either:-

  1. Your battery can't supply enough current for two servos.
  2. Your servos are generating so much noise on the power rail you are resetting the arduino.
    Possible Solutions:-
  3. Use a separate battery to power the motor and the arduino (but connect the grounds together)
  4. Add some large decoupling capacitors across the supply, 47uF or larger along with a 0.1uF ceramic in parallel.

Ok. I have to test those options tomorrow. But I am amazed. Because can even defining of ports with pinMode()-functions took so much power?