Starbucks Corp. stock edged higher in after-hours trading Tuesday after the coffee chain reported fiscal second-quarter earnings within expectations, highlighting it as an achievement amid rising costs, inflation and thinner margins.