A mother should have been transferred to hospital four hours earlier to save her baby's life, a coroner has found.