|It was a good deal for both of them|
One of the odd characteristics of Western military interventions is that, once we are engaged, we find it very difficult to disengage. In many cases, arguments are made for staying longer and investing more - Afghanistan is the prime example. It seems that Putin doesn't see it that way - you get in, accomplish what you can accomplish and get out again. No long quagmire, no open-ended commitment. It's interesting to remember that this is precisely what the foul and odious GW Bush promised us in 2003. An invasion, a road march to Baghdad, a quick regime change and the American troops would be home in the Summer. Whether that was ever a sincere promise is an open question, but it ultimately doesn't matter. It's not something Americans seem capable of actually doing.
For the Russians, the mission truly is accomplished. The Assad regime is stabilized, and his government is deeply indebted to Moscow for their continued power - indeed, their continued existence. Iran is seen as Syria's lesser ally, and NATO is weakened by the ongoing Turkish war with the Kurds. Russia can claim to be the driving force behind peace talks, and if Syria ends up de facto partitioned into regime, rebel, and Kurdish areas with limited combat it would absolutely be a win for Putin. Eventually, the Russian diplomats force Assad out, replace him with someone of their choosing, and work for some kind of federalized system of governance that cements the status quo.
There are so many valuable lessons to be learned here, the most important of which is that nations need to always act first and foremost in their own interest. Second, military intervention is a very specific tool - it only solves problems that can be solved by breaking things and hurting people, and once that is done the presence of combat troops becomes a costly hindrance to longer term solutions. Third, many of these conflicts have more than two factions involved - no intervention can be effective unless it chooses one side and backs that side only. As soon as there is a lack of clarity over what the intervention is supposed to accomplish, the intervention will never end, and it can never 'succeed'.