there are travel agencies all over vietnam, who can do it for you. unless you are going at an unsually high time, i don't think it's worth doing in advance. I don't believe you save much
as a practical matter, the flights are probably ho chi minh city to da nang. then hue to hanoi. you can go from da nang to hue by bus or by train.