I'm no expert on Rio, but I have visited the city twice, have taken a favela tour, been in a police vs. drug gang shoot out (not as a shooter), and read quite a few books about the place, so here are my observations on the latest events:
1. The authorities will not win until they have a superior ability to supply local public goods in the favelas. That is a ways away. (The broader lesson is you should not take in more immigrants than you can supply local public goods for, and that is why fully open borders is not a good idea in every setting.)
2. On a day-to-day basis, the police are outmatched in terms of weaponry and also will to win. The military cannot remain deployed forever and a tank cannot rule a neighborhood. I am skeptical about current victory claims, which from my comfortable perch in Fairfax I suspect are temporary at best.
3. Sometimes the Rio police push out the drug gangs, but the alternative is paramilitary groups which then run the drug trade. (Those groups, by the way, employ a lot of former policemen.) A police victory is not always the solution. Here are the different types of police in Brazil.
4. The Brazilian state has extended its governance, throughout the country, much less than you might think. The current battles are, among other things, an exercise in nation-state building, which historically has not come easily to most regions. Furthermore relying on the military for a (partial) victory is in the longer run a double-edged sword, especially in a nation with a history of military coups and military rule.
6. One of my favorite non-fiction books is Nancy Scheper-Hughes, Death Without Weeping: The Violence of Everyday Life in Brazil, highly recommended.
7. The Brazilians are now building high-speed rail between Rio and Sao Paulo.