from what i remember of wrath of khan kirk didnt know david was his son.
it seemed to me that carol must have transferred some place else without telling anyone.
Once again relying on my aging memory, I believe Kirk said, "Is that David?" showing recognition, and then, "Why didn't you tell him?" To which Carol replied, "Were we together? Were we going to be?" I think there was other dialogue as well that implied Kirk knew.
but yeah i read carol marcus had been in an earlier script but written out.
Ah, that explains it.