In objective terms it is pretty easy, despite pretty much every step forward being followed by two backwards Brazil is still at only(when compared to others anyway) half the third place so just increasing the average leadership to decent is enough. To good should even be enough to keep second place for a while until China inevitably speeds by.
How it could happen is trickier though. The way see I see besides more complex troubles Brazil has two chief problems during the 20th century. The first is the First Brazilian Republic(República Velha) which you have to get rid of or reform so thoroughly you did that in effect and the military(army specifically) increasingly playing a part in politics until the last decade to detriment of the nation in all but the end of the former.
Would be nice if anyone else has more to say or has said in another thread, Brazil due to it's size and resources is one of the countries that doesn't need to be great to be a... great power, it just has to not consistently work against themselves and I am always curious to see how people choose to make it go different.