Tyrese Maxey scored 30 points and dished out 10 assists as the 76ers survive a late comeback attempt to beat the Heat.