Help me to code servo

Please help me to add servo code for RC, controlled by potentiometer.
servo=(A0)

/Transmitter/

int xAxis, yAxis;
void setup() {
Serial.begin(9600);
}
void loop() {
xAxis = analogRead(A0);
yAxis = analogRead(A1);
Serial.write(xAxis/4);
Serial.write(yAxis/4);
delay(20);
}

/Receiver/

#define enA 9
#define in1 4
#define in2 5
#define enB 10
#define in3 6
#define in4 7
int xAxis, yAxis;
int x = 0;
int y = 0;
int motorSpeedA = 0;
int motorSpeedB = 0;
void setup() {
pinMode(enA, OUTPUT);
pinMode(enB, OUTPUT);
pinMode(in1, OUTPUT);
pinMode(in2, OUTPUT);
pinMode(in3, OUTPUT);
pinMode(in4, OUTPUT);
Serial.begin(9600);
}
void loop() {
xAxis = 510;
yAxis = 510;
while (Serial.available() == 0) {}
x = Serial.read();
delay(10);
y = Serial.read();
delay(10);
xAxis = x * 4;
yAxis = y * 4;
if (yAxis < 470) {
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
motorSpeedA = map(yAxis, 470, 0, 0, 255);
motorSpeedB = map(yAxis, 470, 0, 0, 255);
}
else if (yAxis > 550) {
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
motorSpeedA = map(yAxis, 550, 1023, 0, 255);
motorSpeedB = map(yAxis, 550, 1023, 0, 255);
}

else {
motorSpeedA = 0;
motorSpeedB = 0;
}

if (xAxis < 470) {
digitalWrite(in1, HIGH);
digitalWrite(in2, LOW);
digitalWrite(in3, LOW);
digitalWrite(in4, HIGH);
motorSpeedA = map(xAxis, 470, 0, 0, 255);
motorSpeedB = map(xAxis, 470, 0, 0, 255);
}
else if (xAxis > 550) {
digitalWrite(in1, LOW);
digitalWrite(in2, HIGH);
digitalWrite(in3, HIGH);
digitalWrite(in4, LOW);
motorSpeedA = map(xAxis, 550, 1023, 0, 255);
motorSpeedB = map(xAxis, 550, 1023, 0, 255);
}
analogWrite(enA, motorSpeedA);
analogWrite(enB, motorSpeedB);
}

You make a start, post that here and we'll gladly help you get it working. But round here "help" doesn't usually mean "Just write it for it me".

In the transmitter you need to read the potentiometer and send it's value as well as the 2 you get from your joystick.

In the receiver you need to setup the servo and in loop() read the new value, map it to the correct range for the servo and write it to the servo.

Easy enough and if you've never used a servo before the Knob example in the IDE which reads a potentiometer and directly drives a servo from it will show all you really need. Give it a try.

Steve