Boston native Cobb (3-3) allowed four runs total (three earned) on four hits, three walks and five strikeouts in 6 1/3 innings. Alex Colome converted a four-out save, his ninth of the season.
Tim Beckham also drove in two runs for Tampa Bay (18-20), which had lost six of nine games coming in.
Boston scored four runs in a chaotic seventh that saw Tampa Bay commit three errors.
Miller chased the ball into center and fired it wildly back into the infield, accounting for his second error on the play and allowing Bradley to reach second.
Bogaerts led off the Boston eighth with a double and Andrew Benintendi walked to bring up Young, who moved Bogaerts to third with a sacrifice fly to right.
Danny Farquhar entered and struck out Mitch Moreland before Colome induced a 5-3, inning-ending groundout by Rutledge.
Tampa Bay struck for five runs in the middle innings.
Beckham hit a two-out, two-run double in the fourth. Corey Dickerson added an RBI double in the fifth before Longoria's 406-foot blast over the Green Monster in left made it 5-0.
NOTES: Boston DH Hanley Ramirez (right trapezius strain) did not play after leaving Wednesday's game in Milwaukee with the injury and missing Thursday's series finale. "(Optimistic) that he'll be back in the lineup (Saturday)," Red Sox manager John Farrell said. ... Tampa Bay RF Steven Souza Jr. (bruised right thumb) was feeling better and hoped to return Saturday or Sunday. "I (expected) him to be in there tonight if a situation presents itself," Rays manager Kevin Cash said. ... Red Sox INF Marco Hernandez (left shoulder subluxation) may be headed for season-ending surgery, per Farrell. ... Rays LHP Blake Snell (0-3, 3.96 ERA) opposes Red Sox LHP Chris Sale (3-2, 1.92 ERA) on Saturday. The game was moved up six hours to 1:05 p.m. ET due to anticipated sustained periods of rain. "We'd like to avoid a doubleheader ... so I'm glad that they did that," Cash said.