take it back to them, tell them you don't want the car in your hands until the smoke problem is gone (If the smoke will go away in 2/3days, let them take car of it in that 2/3days then hand it to you after), it is not up to dealer standards selling a car in bad shape like yours. I've worked for car dealers before and we've always made sure our cars are in top nick when it leaves the showroom because we don't want our customers coming back and fourth with bad situations.
but on another note, "you wasn't having your foot on the brake and acceleration at the same time causing the smoke right?"