If my period lasts five days and I had sex two days after my period, can I still get pregnant?

Possibly. It is possible to become pregnant at this time. Most people ovulate a little later, but depending on the length of your cycle, you could become pregnant.
Possibly. From the time you start your period until you ovulate can range from about 7 days to 21 days. When you have sex, the sperm can be effective for up to 6 days. So, if you ovulate within six days of having sex - there is a chance that you could conceive. When you have sex closer to the time of ovulation, your chances for conceiving increase.