PHILADELPHIA — Boston Red Sox shortstop Xander Bogaerts is trying to establish himself as a major league hitter. Teammate Justin Masterson is trying to re-establish himself as a reliable starting pitcher.

Both took steps in that direction Thursday night.

Masterson pitched six strong innings and Bogaerts went 3-for-4 and keyed a six-run third inning with a three-run triple as the Red Sox beat the Philadelphia Phillies 6-2 in the rubber game of their season-opening three-game series.

Masterson, an All-Star in 2013 with Cleveland, posted a career-worst 5.88 ERA with the Indians and St. Louis in ’14, a season that saw him spend time on the disabled list with a bad right knee.

“(The start) means ‘OK, we’ve done it once; now we need to go out and do it again — continue to be consistent,’” he said after allowing two runs and three hits, while striking out seven and walking one.

He mixed his sinker and slider to good effect, throwing 64 strikes among his 95 pitches.

“When that sinker’s on, it’s got such depth, such unpredictability to a hitter at the plate,” manager John Farrell said. “When it’s cold, it’s a very difficult pitch to lift, but the mix of his slider has been very good.”

At the plate, Masterson had the first two-hit game of his career. He drove in a run with the first of those, a single in the third inning.

“It’s not skill,” he said with a laugh. “It’s just luck.”

Bogaerts, entering his second full season as a regular, hit .240 last in 2014 and was 1-for-7 in the first two games of the year. On Thursday, however, he reached base five times.

“Hopefully,” Farrell said, “it gives him a chance to breathe a little bit.”

Farrell said Bogaerts, who has been working with coaches Victor Rodriguez and Chili Davis, was more balanced and patient than he has been. The manager also liked the fact that two of Bogaerts’ hits, including the triple, went to right field.

“Timing is something that I always have problems with in the beginning,” Bogaerts said, “so I kind of know myself on that, but it just comes down to see the ball, hit the ball. I just try to simplify things as much as possible.”

Philadelphia starter David Buchanan took the loss. He is winless in his last 10 starts, dating to a victory over Houston last Aug. 6. He went three innings and yielded six runs and seven hits while striking out one and walking four.

Buchanan retired the first two batters he faced in the third inning, but first baseman David Ortiz and left fielder Hanley Ramirez both singled, the latter off Buchanan’s glove. The pitcher recovered the ball behind the mound but threw it into the stands attempting to retire Ramirez at first, allowing the runners to advance to second and third.

Third baseman Pablo Sandoval walked to load the bases and right fielder Shane Victorino legged out a grounder to deep third for an RBI single. A walk to catcher Ryan Hanigan forced in another run before Bogaerts blooped his triple to right, clearing the bases and making it 5-0.

Masterson chased in the inning’s sixth run with a single up the middle.

“I think I tried to be too aggressive,” Buchanan said.

He was also asked how much he looks forward to finally ending his long drought.

“I’d like to get past the third inning,” he said.

The Phillies answered with two runs in the bottom of the third on Masterson’s wild pitch and a single by second baseman Chase Utley.