In the UK we have a thing every two years called Sport Relief - a charity event on BBC, and one of the things they do is have an football (soccer) match between an England team made up of former players and celebrities and a ‘Rest of the World’ team made up of the similar players/celebrities.
The very recently retired players such as Beckham, Scholes, Giggs etc are the obvious best players, the next best players tend to be the younger celebrities who were actually half decent at football and played semi-pro in their youth, and then next up are the long retired pro players such as Shearer, Zidane etc who struggle simply because they are unfit, but still produce excellent passing/shooting - and then finally the worst players are the celebrities who have never really played football but take part for a laugh.
If Obama used to be pretty good before he entered politics, and providing the former NBA guys he’s playing against are unfit or not taking it too seriously (why would they?) then absolutely it can be quite an even playing field.
Obama is probably fitter and has greater determination to look the part.