Farnsworth (1-5), a former Yankee, gave up a one-out infield hit to Francisco Cervelli that also deflected off the pitcher, and Eric Hinske's pinch-hit single through the right side left runners on first and third. Robinson Cano's deep fly to center scored the tying run and after a walk, Hinske scored on Miranda's hit.
It was the 28th time the Yankees won this season in their last at-bat.
Mark Teixeira hit his 39th homer to tie the game in the sixth and Nick Swisher hit his 28th of the season an inning later.
A.J. Burnett struck out eight in 6 1/3 innings, yielding two runs on three hits and three walks.
Brian Bruney (5-0) pitched 1 1/3 scoreless innings to earn the win.
Copyright 2009 by United Press International.