England's Casey and Cook each stood on six-under 136 after two rounds at the Innisbrook Resort Copperhead course in Palm Harbor, Florida.
Donald had five birdies and four bogeys in his one-under 70, surrendering a one-shot lead with two bogeys in his last four holes. Im posted a 67 and Stallings a 68.
Casey, who edged Tiger Woods and Patrick Reed by a stroke last year for the crown, began on the back nine and promptly birdied three of his first four holes, sinking a 10-foot putt at 10 and landing his third shot inches from the cup before a tap-in at the par-5 11th.
Casey scored on the other par-5 holes as well, sinking a three-foot birdie putt at 14, a six-footer at the first before holing a 27-footer for eagle at the fifth.
"I feel really good about (my game) because last week was rubbish," said Casey, who was stung by a missed cut at the Players Championship at TPC Sawgrass.
"I struggle a little bit around Sawgrass and that frustrated me, annoyed me, coming in here trying to defend my title, which I would love to do because I never defended a professional title, I've defended amateur titles, English Amateurs and PAC 12 titles, I would love to do that here.
"So I worked very, very hard on the game and for whatever reason it's slowed things down. Quieted the transition at the top of the swing," Casey said. "Nice to turn it around after last week to suddenly be not in control of this event but I'm near the top, which is good."
Casey's lone bogey came on his closing ninth hole, finding bunkers with his first two shots and missing a six-footer for par.
"Disappointing on nine," Casey said. "But everybody's going to make bogeys. If you can just minimize those, it puts you in a good position."
Cook had five birdies and one bogey in his four-under 67.
He opened with a birdie from seven feet, added a tap-in birdie at the par-4 third and then ran off three birdies in a row with 12-foot putts at the ninth and par-5 11th around one half as long to begin the back nine.
His only bogey came at 12 after finding a greenside bunker.
World number one Dustin Johnson was among three players on 138 after a 69 that included a double-bogey at the par-three 13th -- where his tee short tee shot found the water.
Johnson, who played alongside Casey, was two-over through nine holes but made five of his six birdies coming in to post a 69 that left him tied with Joel Dahmen (72) and Curtis Luck (68).