You are first of all looking for the LCM of 32 and 80
Don't know which algorithm you learned , but here is one of them:
32 = 2*2*2*2*2
80 = 2*2*2*2*5
So you will need 2*2*2*2*2*5 = 160
160/32 = 5 <------ forwards
160/80 = 2 <----- guards
80/5 = 16
32/2 = 16
So they can form 16 teams, with each team having 2 guards and 5 forwards.
Check: all players are used, each team contains the same number and
combination of players.