10 juniors are running for 4 positions. There are ten people who can get into the first spot Nine people for the second 8 people for the third 7 for the fourth 10x9x8x7= 5040 different ways.
For the sophomores: 12x11x10x9x8= 95040 However, the positions are identical which means that the order doesn't matter. (There's a difference between A getting postion 1, B for 2, C for 3, D for 4 and B for 1, A for 2, C for 3, D for 4)
There are 5 identical positions, therefore we divide this by 5! (5x4x3x2x1)= 120 95040/120= 792 Juniors have 5040 positions, sophomores have 792