Evidence revealed in A Storm of Swords points squarely at Joffrey as the instigator. At the queen’s breakfast he revealed, "... I am no stranger to Valyrian steel." (III: 663) Tyrion, suspicious of that statement, suggests that he will give a Valyrian steel dagger with a dragonbone hilt as a gift to Joffrey. Joffrey’s reply is awkward: "Joff gave him a sharp look. ‘You ... yes, a dagger to match my sword, good.’ He nodded. ‘A ... a gold hilt with rubies in it. Dragonbone is too plain.’" (III: 664) Finally, Jaime questions Cersei about the attempt on Bran. She reveals that Robert said in Joffrey’s hearing that it’d be a kindness to end the boy’s misery, but that they were all too weak. Jaime concludes that Joffrey, eager for his father’s attention, may have decided to prove that he was capable of doing it (III: 823).
Renly makes this plain when he says to Stannis, "A year ago I was scheming to make the girl Robert’s queen." (II: 350) Robert tells Eddard that Renly has been telling him about Margaery’s beauty (I: 260). Clearly, Renly hoped that his source was correct in claiming that Margaery bore some resemblance to Lyanna, thinking that it would make it easier to entice Robert to bed and wed her. There is some argument whether Renly’s secondary intention was to attempt to bring Eddard into the conspiracy, but Eddard’s account (I: 233) does not suggest that Renly pressed the point regarding Lyanna, or discussed Margaery, any further once Eddard disavowed any resemblance between the two young women.
The overly-coincidental arrival of his brother Euron Crow’s Eye (III: 524) suggests that there is more than meets the eye to Balon’s death. The Ghost of High Heart revealed this prophetic vision which seems to have some bearing: “I dreamt of a man without a face, waiting on a bridge that swayed and swung. On his shoulder perched a drowned crow with seaweed hanging from his wings.” (III: 249) The common interpretation of this is that the "man without a face" is a Faceless Man and that the drowned crow represents Euron as his hirer. Euron is known for having travelled widely, from the Summer Isles to the Free Cities and beyond to Asshai, and would certainly have had the opportunity and funds (thanks to his reaving and pirating) to hire a Faceless Man.
It seems clear, from Littlefinger’s discussion with Sansa (III: 767-769), that he arranged for the poison to be secreted in the hairnet he had Dontos bring to her for a third party to pick up and drop into Joffrey’s drink at an opportune time. In general various Tyrells are blamed for the attempt. Lady Olenna was certainly the only one who had an opportunity to take the poison from the hairnet, as she adjusted it when meeting Sansa and Tyrion outside of the feasting hall (III: 672, 673). But it’s argued that Margaery, being right next to Joff and his cup, had a greater opportunity to place the poison in his cup with the added argument that, given that she was expected to share drinks with him from the chalice, it’d be safer if she herself put in the poison. Some suggest Ser Garlan, Margaery’s brother, may have been the true culprit. Although he was seated even further from the newlyweds than Lady Olenna was (III: 674), he was near the chalice when it was briefly left unattended for the pie-cutting; however, so was Lady Olenna (III: 681). It should be noted that an alternate theory has been put forward, suggesting that Lady Olenna or another Tyrell was actually targetting Tyrion, based on the fact that Joffrey succumbed to the poison shortly after eating from the piece of pie given to Tyrion (III: 683). Given how Littlefinger is quite unsurprised by Joffrey being dead, it seems he was entirely unaware of the possibility that the poison might be given to Tyrion instead of Joffrey. This does not necessarily negate the possibility, but it does make it seem rather less likely. Joffrey was clearly a much greater concern for the Tyrells than Tyrion and his marriage to Sansa were. Finally, it is almost certain that Lord Mace is completely unaware of his family’s involvement in Joffrey’s murder.
The issue of the disappearance of Rhaegar, Symond, and Ser Jared Frey causes increasing hostility between their former hosts at White Harbor, the Manderlys, and the Freys that follow Roose Bolton into the North. The three Freys served as envoys to White Harbor, arranging marriages and ensuring the loyalty of the Manderlys while Lord Manderly attempted to recover his surviving son and heir, Ser Wylis, who had been a hostage after having been captured at the crossing of the Trident. Once this was proved by his various agreements and his apparent execution of Ser Davos Seaworth, arrangements were made for Ser Wylis’s return.
What follows next is key: while feasting the returned heir to White Harbor, Lord Manderly secretly met with Ser Davos (whom he had hidden in the Wolf’s Den) and revealed that he was willing to follow Stannis provided Ser Davos did him a service by bringing Rickon Stark to safety from his present location (V: 393). Lord Wyman intended to travel by barge and litter to Winterfell, as commanded by Lord Bolton… but the three Freys were to receive horses from him so that they could travel more swiftly. Wyman then asks Davos if they have the custom of the “guest gift” in the south, and Davos says yes: you give them to your guests on the day they depart (V: 392). The salient point is this: guest right is sacred in the North, and it protected the Freys… but when Manderly gave them his guest gifts, they were no longer his guests and no longer protected.
What happens after that requires us to look at the wedding feast for Ramsay Bolton at Winterfell. Lord Manderly presents three huge pork pies and eats from them with gusto (taking two helpings from each, in part to prove they are not poisoned). So reassured, the rest of the wedding party eats, including the attendant Freys (V: 493). Notably jovial through the proceedings, towards the end the drunk Lord Manderly calls for a song about the Rat Cook (V: 497). All together? The three pies contained the three Freys, which Manderly wilfully (and joyfully) fed to the unsuspecting guests at the feast as a means of having his revenge. The song about the Rat Cook indirectly reveals this, as the tale concerns how the Rat Cook served the Andal king his “prince-and-bacon pie”.