ST. LOUIS -- There were smiles all around the clubhouse on Wednesday night as attendants hurried to pack for the Yankees' flight back to New York. And for good reason.
One day after the Yanks struggled to find any rhythm en route to being shut out for the second time this season, they flipped the script. For a game so complex, the solution to their hitting woes was found in five simple words.
"Getting more pitches to hit," Brian McCann said.
The scoring came in droves, as the Yankees scored seven runs in the third and fourth innings combined to defeat the Cardinals, 7-4, at Busch Stadium, ending their nine-game, 11-day road trip with a 5-4 record.
It wasn't a matter of how their 12 hits came -- on 11 singles and a double -- but when. After going 4-for-18 with runners in scoring position in the first two games of the series and struggling to get key hits on Tuesday, New York went 4-for-9 with runners in scoring position on Wednesday to pick up the series victory.
"Guys just went out and had a good approach," Jacoby Ellsbury said. "You're not always going to have your 'A' game every single night. In this game you sometimes have to be able to forget about it, learn from it and rebound the next game."
Ellsbury, who struggled over the first eight games of the road trip, hitting for a .152 average, started the scoring in both big innings.
With two on and one out in the third, Ellsbury drove a second-pitch fastball from Cardinals starter Shelby Miller to right to plate the game's first run. McCann, who made the first start of his professional career at first base, walked to load the bases.
It was McCann's backup at catcher who broke the game open. John Ryan Murphy lunged at an 80-mph first-pitch curveball, driving it to right-center to plate two more runs. An Ichiro Suzuki groundout sent home a fourth run.
"We had some big nights from a lot of guys: Ellsbury, [Brian] Roberts, McCann," manager Joe Girardi said, beginning the long list of successful offensive contributors. "Then Murphy comes up with a big hit and Kelly Johnson gets a couple of hits.
"Everybody contributed, up and down the lineup."
And a Yankees team that was desperate for any productivity the night prior kept producing an inning later.
With two outs and one on, Roberts lined a first-pitch fastball to center for a double, putting runners on second and third for Ellsbury.
Ellsbury, who finished 3-for-5 with three RBIs, went after a first-pitch offering from Miller. He connected on a 79-mph curve, sending a scorching liner back through the middle, scoring two more.
After Ellsbury stole second, McCann sent him home with a single, and that was plenty for the Yankees' pitching staff.
"It's just one of those nights where everything seemed to be right where they were putting the bat," Cardinals manager Mike Matheny said. "Not a great explanation."
Starter Hiroki Kuroda breezed through the first, and despite running into trouble in the following frames -- the Cardinals stranded nine through the sixth -- he ended his night tossing 5 2/3 innings while allowing nine hits and three runs spread across three innings.
"Initially, I felt really good, but I ended up giving up a lot of hits," Kuroda said through his interpreter. "But I got big outs, so it was OK."
"The first inning he kind of breezed through, and then he got in trouble," Girardi said. "He was able to make the big pitches when he had to."
After St. Louis made it a four-run game and put runners on the corners with two outs, reliever Dellin Betances needed only one 80-mph knuckle-curve in the sixth to get Matt Holliday to fly out to left.
St. Louis added a run the eighth to draw within three, but that's as close as the host team would get. Closer David Robertson allowed a leadoff single and walked the second batter in the ninth, bringing the potential tying run to the plate three times while striking out the side to send the Yankees home with a win.
The solution to the hitting woes was forgetting and rebounding.
"I think sometimes it's just where the guys are locating the pitches that makes the difference," Girardi said. "Pitchers walk a fine line, and our guys were able to take advantage of some mistakes."
That, combined with thoughts of home, brought smiles across the clubhouse.
"It's going to be a happy flight," Ellsbury said.
Alex Halsted is an associate reporter for MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.