It's a hard call, depending largely on what you're looking for in the game experience. I, personally, would suggest 5. (Well, I would suggers "both, and 6 into the bargain", but if you have to go with just one, go with 5.)
Dragon Quest V: Hand of the Heavenly Bride - has what may very well be the single best story in the DQ series. Certainly it has a stronger focus on story than any other DQ.
Dragon Quest IX: Sentinel of the Starry Skies - has more optional content than any other Dragon Quest game, and even 95% of other video games, period. AT LEAST 95%. The main story can be completed in 80-125 hours (give or take; I dawdled some and was in the 140s, I believe), but with as much postgame content as it has, people have had files go past the 500-hour mark. Some even farther! All depends on how thoroughly they want to do it all.
This is not to say that DQ5 is light on optional things (it's got a variety of sidequests and minigames), or that DQ9 skimps on story (slightly above par for the DQ-series course). Just that the two games focus on separate aspects, and are notable for being superlative in their area of focus. --- "As the good archmage often admonishes me, I ought not to let my mind wander, as it's too small to go off by itself." -Danilo Thann
I played them in order. Loved both of them. I ended up burning out both games. If you play Hand of the Heavenly Bride, there is one point in the story where you have to make a choice that changes the outcome of the game. You'll know what it is when you get there. I used 3 different save files so I could play the game different ways. That stretched out the game and also made it more interesting.
Technically speaking, that choice in DQ5 doesn't affect the outcome of the game, it just pretty strongly changes the flavour of the process of getting to that outcome. And again, yes, you'll know it when you get to it. --- Yes, my DW3 goal is insane.