You don't
you have to do it the right way
There's only one hammer in The Legend of Zelda A Link to the Past, and that's the magic one.
In Link and the legend of Zelda, Phantom Hourglass, you get the hammer in the isle of ruins, or the island of the dead.
it is in the 4th dungeon in the dark world
the hookshot is in the swamp palace.
It is found in a chest in the Dungeon on top of the mountain.
the third dungeon where you get the third pendant.
First you need all three pendants and at least 110 rupees. After Sarasha marks the first dungeon loctation in the dark world map, head there. As you are going there a Monkey will talk to you. He wants 10 rupees. Give him them for now. Next go to the dungeon entrance. The monkey will ask for 100 rupees to open the door. Pay him and go in the dungeon. About halfway through the dungeon you will get the magic hammer in a big chest.
Hammer
Once you beat the first dungeon and get the pendant meet sarasala and he will give you the boots.
hyrule castle slash the magic lock to open it
To obtain the pegasus boots in Link to the Past, you will need to pass the first dungeon and go to Sahasharla, AKA the man in the house by the dungeon. He will give you a speech and give you the boots. Hope this helps! ;)