Freddy Galvis followed with a two-run home run to right field.
The Phillies scored five more runs in the sixth to make it 9-1. Both Galvis and Frandsen finished the game with three RBIs.
Hernandez allowed 11 hits, nine runs, one walk and had no strikeouts in six innings.
Phillies left-hander Raul Valdes started. He allowed two hits and one run and struck out five in three innings.
The Rays took a 1-0 lead in the third when Jason Bourgeois singled to right and scored on Sean Rodriguez's double to left.
Up next: The Phillies play their second-to-last Grapefruit League game beginning at 1:05 p.m. ET Wednesday against the Tigers in Lakeland. Phillies left-hander Cole Hamels gets his final start before he pitches on Opening Day for the first time in his career Monday against the Braves at Turner Field. Right-hander Chad Durbin and left-hander Antonio Bastardo also are scheduled to pitch.
Todd Zolecki is a reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.