1st Encounter: Hammerhead starts on a turret gun. It's best to stay in the shadows in the back of the area. You can just circle around until he doesn't see you, then run behind him and press . Just do this 3 times.
Final Encounter: You will want to throw an object at Hammerhead and move in front of one of the generators. He'll shoot it with a heavier weapon and it'll explode causing lots of dust to be everywhere. Use your Spider Sense and get above and behind him. Press when prompted to attack. Do this 3 times total. Now the last part, you need to cause him to run into a wall to disorient him. Once that happens, again press when prompted near him.