Then how did messi win 5 la liga top scorers to 3 in that time.
Messi has actually played more games in La Liga during their time in La Liga (09-18), and score more goals too, despite have a worse ratio.
09-10: Ronaldo was actually injured for a few months, only scored 33 goals in 35 games overall. Messi has scored 47 goals in 53 games overall. Ronaldo still had better ratio, but with much less goals and apperances.
16-17: Ageing Ronaldo started focusing in CL more (12 goals in 13 games) and rested more in La Liga (25 goals in 29 games). Messi scored 37 goals in 34 La Liga games.
17-18: Ronaldo again focus more in CL (15 goals in 13 games), and rested more again in La Liga (26 goals in 27 games). Messi had 34 goals in 36 La Liga games, but only 6 goals in 10 CL games.
In conclusion,
1. Messi is better goalscorer in La Liga in terms of total no. during their time, although Ronaldo is nearly the same, scored/played less, but with better ratio.
2. Ronaldo is better goalscorer in CL, more total goals and more important goals, but Messi is not far behind and may still have a chance to catch up in future (127 goals vs 113 goals), especially when he was 2 years younger, and playing for a more attacking side.
3. Ronaldo is better goalscorer for international, Messi is very unlikely to catch up, at 32, I think its almost impossible. (99 goals vs 70 goals). My guess is, Ronaldo would probably end up his career with 110-120 goals, Messi would probably end up with 80-90 goals. I expect they would both retired from national team after 2022 WC. (really, 3 year from now, Ronaldo will be 37, Messi will be 35, there's no chance they could play another WC after that, they should just retire for good)
Verdict,
1. Ronaldo and Messi will both score 800+ career goals when they retired. Probably no one will come close to break their record for long time. Maybe Mbappe has a small chance (still too early to say), he started really well at young age, already scored 97 goals at age 20, but he was at easy league to score goals, and it also depends on many many years of keeping up consistency at highest level.
2. Presumably Ronaldo will score 110+ international goals, his record won't be broken for a long time. Neymar looks likely to reach near 100 goals, but I am not sure, he seems past his best already
. Lukaku may have a chance of reaching 100 goals, if he keep scoring 8-10 goals per year in next 5-6 years (by 32 years old), with Belgium world class midfield supply its possible. Kane may have a small chance of reaching 100 goals too, if he keep up his great form for next 6-7 years (by 33-34 years old). But it's also rare for players to keep up for many years, so I think both is unlkely.