The cost is 1,900 THB.
You'll need to go to Immigration at Chaeng Watthana.
You'll need a photo, copies of your passport, entry stamp, TM.6 (Departure Card), form TM.7.
Not sure how long it might take as a lot depends on the exact day, time. My friend went in the afternoon and it took him 30 minutes.
This assume you came in on a 30-day Tourist Visa Exemption.