Happy to explain. I won't bother with a formal proof, but I hope to make everything intuitive.
For 24 months, you are going to be depositing at least 100. That adds up to exactly 24 * 100 = 2400. (100 is the a in the formula.)
In the second month you will deposit 50 more, in the third month you will deposit 100 = 50 * 2 more, in the fourth month 150 more = 50 * 3.
In short, you will be adding 50 * 1 + 50 * 2 + 50 * 3 and so on to 50 * 23. (50 is k in the formula)
But by a fundamental fact of addition and multiplication, you can simplify that to
50 * the sum of 1, 2, 3 and so on to 23. You may not have thought about that it big a simplification, but it is just elaborating
33 = 21 + 12 = 3 * 7 + 3 * 4 = 3 * (7 + 4) = 3 * 11 = 33.
Now I am not going to prove this, but you can test for yourself. If we add up whole numbers from 1 through n, the sum is
n * (n + 1) / 2.
If n is 2, the sum is 3, which does equal 2 * 3 / 2.
If n is 3, the sum is 3 + 3 = 6, which does equal 3 * 4 / 2.
That little formula comes in handy when n gets big. For example, add up all the numbers from 1 through 100.
100 * 101 / 2 = 50 * 101 = 5 * 1010 = 5050.
So n is 23 in your case.
Presto
24 * 100 + 50 * 23 * 24 / 2 = 16200.
It may look like magic, but it is just knowing a formula that comes up surprisingly frequently.