using a servo motor controller to control a dc motor

Me and my friend are trying to make a 2 meter rc boat.It will use 2 motors a servo motor to steer and a dc motor to go forward. The problem is the rc circet has 2 servos insted of 1 sevro and 1 dc motor. I was wondering could I plug the data wire from the reciver to pin 0 on a arduino uno and have a transister plugged into pin 10 to control the flow of currunt from a 6 volt battery to a dc motor(to control its speed).If that is possible would I use this program
void setup()
{
pinMode(10, OUTPUT)
}
void loop()
{
analogRead(0) = int val
val = map(val, 0, 1023, 0, 255)
analogWrite(10, val)
}

What servo controller? What motor?? We cannot guess these details!

Your guess at a switching circuit for a motor is wrong - have you searched this forum
or the Arduino playground for how this is done? Switching is done with the common-emitter
circuit, never the emitter-follower as you have. This means high-side switching requires a PNP
or p-channel MOSFET, low-side switching requires NPN or n-channel MOSFET.

Why can't you just use an electronic speed control (ESC) to control the dc motor. it seems that you have a 2 channel reciever (2 servos). The ESC takes a servo signal (PWM) to control motor speed. There are ESC's for boats that give you forward and reverse speed control.

I have looked at a esc but they cost $100 and another$70 for a battery that works