Factory reset will not get rid of activation lock. If you have forgotten your Apple ID or password, you will need to contact Apple support.