The quest is Wolf Whistle and you can buy a dog at the store in Taverly after the quest.
It's currently not possible to undo a quest in RuneScape.
The legends quest on runescape is not gone, I suggest that you check again.
To get a pet dog on Runescape you will need to complete the "Wolf Whistle" Quest which in turn, unlocks "Summoning" skill, then head on to Yanillle ( you can get there almost quickly by watchtower teleport of ring of dueling to "Castle Wars", then go to pet shop there to buy a dog, bring around 5000gp, shouldn't be that much, but just in case.P.S The "Wolf Whistle" quest is fairly easy.
A quest on Runescape is an adventure that puts you in a conflict, you solve it and you get rewards like money, skill experience points, quest points, and items.
If you quit runescape...
There are many websites where one can get advice on completing a Runescape quest. The Runescape website itself offers advice as does the website Tip.It.
The quest Swept Away was released in RuneScape at the same time as the Halloween event in 2008.
The quest is called "The Chosen Commander".
You have to do the quest "Shield of Arav" for help on the quest go to Tip.it it's a website that i use most for runescape quest guides, skill calculators, ect.
They dont come in the room, they have to get into the garden then kill the dog, then with a bow and arrow they shoot through a window, use RuneHQ.com for quest help.
By following all the requirements for the quest or you can go on a runescape help site. Here's one: www.runehq.com
You will need to complete the "priest in Peril" quest.