USB to Autopilot

What number pins do I use to send data to autopilot on a usb to serial? ( Is it 3 and 5)

Serial RS232 (DB-9)
2-Rx
3-Tx
5-GND

If you want to transmit to the AP then the Tx (3) pin from the USB-serial has to go to the Rx (2) pin of the autopilot.
To get data from the AP into the PC you have to connect the other two crossed.
So in short: pin 5 to pin 5, pins 2 and 3 crossed.
---
The input pins on the autopilot show no tx /rx or gnd only hi and low but on the output from ocpn are tx and gnd . Which should be on tx-rx the hi or low?
---
Input hi = Rx (receive) on the AP side - here goes the Tx from OCPN
Input lo = GND
When talking about lo and hi that's RS422 speak (differential lines) and as Gerhard stated there should be no problem with modern RS232 connectors.
--
Remember that while RS-232 Serial uses a +/-9v signaling scheme, NMEA uses 0-5v.
Only good quality Serial/USB converters will switch on 0-5v, so don't try to get by with a cheap one.
We've used Keyspan converters since our first AIS in 2006 with no problems.
---
Correct, Keyspan are first choice. However mostly because of driver problems with the cheap ones for the poor Windows people... The small difference between RS422 and RS232 doesn't matter.