The main problem is going to be figuring out where the other RC car is. Using only ultrasonic and IR sensors is not going to be very robust.
However, you can probably get good enough to demonstrate under controlled circumstances.
What you have to do is discriminate where "the thing" you are following is relative to the local bot, and compare to where it "should" be. Then output speed/direction control based on that discrimination.
Assuming you're on a track where there aren't many other obstacles or other cars, you can start with a simple follower controller. Use three ultrasonic sensors.
// the control values we send to servos, in servo pulse time units
unsigned short turning = 1500; // < for left, > for right
unsigned short speed = 1500; // < for reverse, > for forward
const unsigned short TURN_SENSITIVITY = 20;
const unsigned short SPEED_SENSITIVITY = 20;
const unsigned short TURN_DEADZONE = 40;
const unsigned short FOLLOW_DISTANCE = 1000; // assuming unit == thousandths of a foot, so microseconds
const unsigned short TOLERANCE = 200;
void loop() {
leftDistance = readSensor1();
midDistance = readSensor2();
rightDistance = readSensor3();
targetDistance = midDistance;
short delta = 0;
if (turning < 1500 - TURN_DEADZONE) {
delta = TURN_SENSITIVITY;
}
else if (turning > 1500 + TURN_DEADZONE) {
delta = -TURN_SENSITIVITY;
}
if (leftDistance < targetDistance) {
if (turning > 1000) {
delta = -TURN_SENSITIVITY;
}
targetDistance = leftDistance;
}
if (rightDistance < targetDistance) {
if (turning < 2000) {
delta = TURN_SENSITIVITY;
}
targetDistance = rightDistance;
}
turning += delta;
if (targetDistance < FOLLOW_DISTANCE - TOLERANCE) {
if (speed > 1000) {
speed -= SPEED_SENSITIVITY;
}
}
else if (targetDistance > FOLLOW_DISTANCE + TOLERANCE) {
if (speed < 2000) {
speed += SPEED_SENSITIVITY;
}
}
setServoTiming(STEERING_SERVO, turning);
setServoTiming(DRIVING_SERVO, speed);
}
This illustrates a simple control algorithm, which technically is a hybrid between a decision tree and a PID controller. You want to tweak the various constants until you have the responsiveness that you need. This loop should really run as fast as it can, although there may be some crosstalk between the ultrasonic sensors that may require you to insert short delays between each sensor reading.
I'm assuming that you know how to program an Arduino, and read this C-like code for describing what the algorithm does.