Spirit Tracks is definitely better than Phantom Hourglass, for a variety of reasons. First, the mode of transportation. We already saw a boat in Wind Waker, so boating in PH was no real thrill, and it felt like a chore, and kind of an afterthought. There weren't nearly as many islands in PH as there were in WW, and you lost the sense of exploration like there was in WW when you were exploring a gigantic 7x7 map. In ST, however, we were introduced to train conductor Link, traveling around Hyrule on a steam locomotive. This worked great. The touch controls were easy to use, the cannon was a blast (lol), and it was just much more exciting, as you explored all four regions. You also got a sense of discovery, thinking, "what's around this bend?", and you were enticed to explore.
Second, the central dungeon, as explained above. PH had the Temple of the Ocean King, which you were required to return to and re-explore after each main dungeon. The hourglass gimmick was fun, and racing around the temple before time ran out was a bit nerve-wracking and exciting, but having to re-visit the temple upwards to 5 times was a real chore, and it just became not fun after the first few times. ST kept this same idea of a central dungeon, but it was presented differently. After completing each realm, you unlocked another floor of the tower, and this was completely different from the floor below it, presenting a wholly original challenge each time.
Third, the gameplay that made ST great just wasn't there in PH. PH felt way too similar to WW, and while, I wouldn't mind that, I don't want two identical clones, they have to be at least a bit unique. ST felt new, and even with the similar graphical style, I didn't let that stop me from enjoying an adventure different from PH. Having Zelda along for the ride was a welcome treat, and a constant companion with you was a nice change in the formula. The items in ST were also better suited for the type of game that it is. For example, in PH you receive items identical to games before it, not providing you with much variety, but rather with a sense of deja-vu. ST, on the other hand, had the whip, which was all new, and it was used in very unique ways both in and outside the ocean realm. Also, the deku spinning thing was also cool, and it made for different and more challenging puzzles. The last element that trumps PH is the addition of the Spirit Flute. Similar to the Ocarina and Wind Waker, the spirit flute allowed you to play various songs to trigger outside events. The DS microphone and stylus were put to great use, and, although not very bus-friendly, it was a lot of fun playing the duets with the lokomos.