Hi, and thanks for your medical question on eHealth forum!
Since the last period was just for two days, you have nausea and vomiting and stomach cramps and you have a history of unprotected sex, take a pregnancy test and see. At times women have a period in first few months, even though they are pregnant.
The other possibility is that you have severe acidity. This can result in your throwing up after sexual arousal. It can also cause cramps.
Since a confirmed diagnosis cannot be given on net please discuss these possibilities with your gynecologist once. Hope this helps. Take care!