There are 50/5 = <<50/5=10>>10 sets of 5 devices in the school.
So the school will pay a total of $40 x 10 = $<<40*10=400>>400 for the $40 software package.
There are 50/10 = <<50/10=5>>5 sets of 10 devices in the school.
So the school will pay a total of $60 x 5 = $<<60*5=300>>300 for the $60 software package.
Thus, the school can save $400 - $100 = $<<400-100=300>>300 from buying the $60 software instead of the $40 software package.
#### 100