F1 (and motorsport in general) is a sport based hugely on two factors: driver and car (a third one: politics intra-team or powers beyond that I will not try to analyse, check Hamilton-Alonso at Macca).
Driver: form, mental status, motivation, racecraft, talent, decision making (on track, off track), driving style etc contribute on how good a driver is. Lots of factors here to determine how good a driver is. One maybe be the best in all these areas but... can be shadowed by a mediocre car. Or one can be rather good or even average and can have a great car, for example Eddie almost won it with Ferrari in '99.
Car: aero efficiency, power unit, reliability, speed, etc. Yet, you can have a great car for one driver and lousy for another, Ricciardo and Vettel, Alonso and Raikkonen come to mind this season. So give a fast-reliable car matching a drivers style and he might excel (if he is a good one) or he might crack somewhere (for example having a good adversary in the team). Give a slow car or one that breaks apart every now and then and even the best driver in the world cannot do much about it in the long run. He might be lucky and win 1-2 races (that first lap at rainy Donigton Park comes to mind) but that will be the most of it. Numerous examples of good drivers in slower or unreliable cars come to mind (Senna, Schumacher, Alonso, Raikkonen, Hamilton, Vettel this year, and the list can go on).
So I will base my prediction only on car performance and current form.
Merc is good and might be good a la Schumacher Ferrari in the next 3-4-5 years. Leaving intrateam politics out, I'd say that both of them have an equal chance to win the next championships. It could be Hamilton it could be Rosberg, both seem to exploit what is given at the fullest. Hamilton might have the edge in racecraft but it seems that mentally he is struggling a bit (the mental part is my own personal opinion). That could cost him dearly. If any of those two leave the team then the replacement could possibly have a winning material in hand but also a strong adversary in Hamilton or Rosberg. Could it be Vettel, Alonso, Ricciardo? Who knows (here comes the decision making part of the driver)...
Further than 4-5 years is impossible to predict. You cannot imagine which car will be the best, Merc dominance, Williams resurrection, Red Bull coming back around or Ferrari pulling a rabbit from a hat and taking all by surprise. And who knows which driver will be around and how well he will have predicted where to go. So 4-5 years from now is impossible. Even a year is impossible, afterall who was to say in 2010 that Red Bull and Vettel would dominate the sport for 4 years and even more so that they are quite far back this year.