Amazon.com Inc. this fall tested package delivery by licensed cab in San Francisco and Los Angeles using taxi-hailing mobile app Flywheel, according to people familiar with the matter. Amazon is studying the broader use of taxis as delivery vehicles, the people said.

Taxis represent Amazon’s latest experiment to speed package shipments to compete more directly with brick-and-mortar retailers, and to seek alternatives to United Parcel Service Inc., FedEx Corp. and the U.S. Postal Service after shipping delays last Christmas....