You get XP for ranking up in two ways:
- Getting a star in a Training Mission (higher medals give more XP, but the XP is non-repeatable and doesn't "add up" with higher medals - as in, getting a bronze, silver then gold will give you the exact same amount of XP as just getting gold).
- Playing online multiplayer games. Playing offline multiplayer does not get you XP.
With that in mind, the best course of action is to get as many gold stars in the Training Missions before boosting the rest. This means you will shorten the time needed to get to 20. You could technically boost all the way from 1 to 20, but this would take much longer and you might as well work on the stars at the same time.
If you're boosting the "Bling" achievement, you don't have to worry about focusing on XP. You will be playing a number of matches where only you get a bunch of kills, so you'll get a large amount of XP. If you and your boosting partner have extra controllers, sign them in as guests to play a 4 player game - this will make both XP boosting and badge boosting MUCH quicker.
Lastly, it should be noted that the 8 Training Missions added within the 2 DLCs give you XP for getting stars in them too. You only need to gain bronze for those DLC pack's achievements, but try to aim as high as you can if you want the extra XP boost.