OAKLAND, Calif. -- Yoenis Cespedes flashed his Home Run Derby form Wednesday night.

The Oakland left fielder hit two homers and drove in a career-high-tying five runs, leading the A's to a 9-7 victory against the Houston Astros at the O.co Coliseum.

The question now for the A's is when Cespedes will be able to play. He was not in the lineup Thursday in the finale of the three-game series.

Cespedes, who won the All-Star Home Run Derby on July 14 for the second consecutive year, snapped a career-high-tying 25-game homerless streak, but he sprained his right thumb in his third at-bat.

Cespedes was jammed on a pitch from right-hander Jake Buchanan and fell awkwardly after hitting a soft ground ball to second base in the fifth. He stayed in the game and made a strong throw from left field but was replaced at the end of the sixth inning.

"He (hurt) it when he fell," A's manager Bob Melvin said. "We'll see tomorrow. X-ray, negative."

Cespedes, who did not talk to reporters after the game, had stints on the disabled list in 2012 and 2013 with muscle strains in his left hand. Last year he missed the first four games after the All-Star break with a sore left wrist.

In case anyone forgot, Cespedes reminded them Wednesday what he means to the A's and how costly it would be to lose him.

"Just look at our record," A's shortstop Jed Lowrie said. "We're a better team with him in the lineup."

The Astros trailed 9-2 after seven innings but scored five times and sent 10 batters to the plate in the eighth inning when the A's bullpen had a meltdown. Right-hander Jim Johnson gave four hits and four runs (three earned) and didn't retire a batter. Dan Otero allowed two hits and a run in one-third of an inning before right-hander Luke Gregerson came on to get the final two outs and strand two Astros.

Left-hander Sean Doolittle pitched a perfect ninth for his 15th save.

Johnson's ERA jumped to 6.92, and he was once again loudly booed as he left the mound.

"It was 9-2, we had a long game (Tuesday) night," Melvin said. "He was one guy that didn't pitch, so therefore he was in the game. At the time we were hoping to maybe use him for two (innings), but it didn't happen. So it is what it is. He's having a tough time."

The A's evened their three-game series with the Astros at a win apiece. Oakland remains two games ahead of the Los Angeles Angels in the American League West.

Cespedes hit a three-run shot in the second inning and a two-run homer in the fourth off Astros right-hander Brad Peacock as the A's built a 7-0 lead. He hit his first home runs since June 19 against the Boston Red Sox, and he now has 16 for the season. He had his fifth career two-homer game and second this season. He collected five RBIs in a game for the third time in his career, all this season.

"He's such a dynamic player," Lowrie said of Cespedes. "He is able to do so much more than just home runs, but he's the two-time Home Run Derby champion. That's what everyone wants to see out of him. But I think he's actually more productive for us when he doesn't try to hit them, when he just lets them happen, because he's strong enough to do it without trying."

Lowrie also homered for the A's, and catcher John Jaso went 3-for-3 with a double, a walk and two RBIs. Right fielder Josh Reddick went 2-for-4 with a double and scored three runs in his first start since coming off the disabled list Tuesday.

Astros catcher Jason Castro went 2-for-5 and scored twice. First baseman Jon Singleton went 1-for-4 with a double and two RBIs, while center fielder/shortstop Enrique Hernandez had two hits and an RBI.

"We did a tremendous job of mounting a comeback," Astros manager Bo Porter said. "We just fell short."

A's right-hander Jesse Chavez (8-6) gave up two runs on four hits over 5 2/3 innings. He struck out seven and walked two.

Peacock (3-7) gave up seven runs and seven hits, including three home runs, over 3 2/3 innings. Peacock walked five and struck out two. He threw 89 pitches. In his previous start, Peacock lasted only one-third of an inning in an 11-0 loss to Boston.

In the second inning, the A's batted around and scored five times. Lowrie hit a leadoff home run, and Cespedes crushed a three-run shot.

"I fell behind way too many guys tonight, and I can't do that against a team like this," Peacock said.

NOTES: Astros rookie CF George Springer (strained left quadriceps) was placed on the 15-day disabled list retroactive to Sunday. He also was bothered in recent days by a sore right knee, but that injury did not land him on the DL. "It's one of those things where I think it's in my best interests just to get healthy," said Springer, who leads the Astros in home runs (20) and RBIs ( 51). ... Astros INF/OF Marc Krauss was recalled from Triple-A Oklahoma City. Krauss started in left field and hit fourth in the lineup. He went 1-for-4 with an RBI. ... A's INF Alberto Callaspo (strained right hamstring) could begin a rehab assignment as early as Sunday.