Confused

Patient: The first day of my last period on ocotober 5 2013,I had sex after like around the 10 11 12 and my obgyn says my due date is jully 12 and im 19 weeks can you please help me out and tell me how this adds up cuase im so confused ?

Doctor: