The correct way to punctuate the sentences is:
A. He lit a candle and said, "You must go up these stairs. When you come to a door, open it and go straight in."
This option correctly uses quotation marks to indicate direct speech and includes a comma before the quotation. Additionally, it correctly closes the quotation at the end.