Clinging to a 2-1 lead in the third inning, the A's doubled their lead when Cespedes belted a one-out solo shot against Rangers starter Justin Grimm and Moss followed with another round-tripper.
The homers provided a cushion for A.J. Griffin (4-3), who controlled Texas on one run over seven innings. The right-hander allowed six hits with no walks and struck out eight.
John Jaso, Derek Norris and Eric Sogard each drove in a run for Oakland, which took the first of a three-game set.
Grimm (2-3) ended up surrendering five runs on seven hits over five full frames.
Mitch Moreland went deep for Texas.
Chipotle plans first price increase in 3 years
Putin thinks Obama would save him if he were drowning