Do you think my program will work?

    for(pos = 0; pos < 180; pos += 1)  
    {                                   
      myservo.write(pos);            


    }

Now the delay in the for loop has been removed you don't need the for loop anyway. The code is telling the servo output to move 179 steps so fast that you might as well just use

 myservo.write(179);

It may not matter in practice, but your servo commands left and right are not balanced. In one direction you turn it from 0 to 179 whilst in the other direction you turn it from 180 to 1. What I don't see is where you move it to the centre so that the car runs straight.

As to the use of analogWrite() to control the speed of the car, it may work but we do not have any details of the motor or its exact wiring.