The ending of Phantom Hourglass confuses me. Why did Nintendo even make them teleport into another world? It feels so stupid.
To pay homage to Link's Awakening. A little treat for Zelda veterans, most likely.
Anyway, we know that Mercay Island is an island in the world of the Ocean King. Yes, Linebeck has built a reputation for himself (albeit not a positive one) on the island. And yes, he and Jolene show prior knowledge of each other- even relationship-wise.
It seems to me that both Jolene and Linebeck are actually from that world, and not the same world that Link and Tetra are from. So why do we see him in Link and Tetra's world at the end of the game? I believe that we are
not supposed to know the answer. I think that the creators wanted to keep us wondering, just like they did at the end of Link's Awakening. At the end of that game, it
seems that Marin's wish came true, but it's not known for sure even after all these years. Similarly, we see an inhabitant from a different world (Linebeck) in the known world (Link and Tetra's) at the end of PH.
I don't believe that we'll be seeing a real answer to this mystery anytime soon. I think that the only way we will get a direct, to-the-point answer is if a fan (or webmaster) ends up being able to ask the creators themselves.
But hey.... a little mystery is a good thing. While the world of Zelda is a big, complicated mess, we have answered many questions over the years. It's neat that some things are left unknown, though it can be a bit frustrating. ;p