The human feotus gets its food from the placenta. The placenta is like a bridge between the blood vessels connecting the mama to the foetus. Food and oxygen will be transfered from the mama's blood vessels to the baby's and waste will be transfered from the baby's blood vessels to the mama's. The baby's blood and the mom's blood do not mix, hence there won't be a problem if the baby's blood is not the same as the mom's.