You are required to generate odd numbers only: so the value you add on -
C
- must be odd, and the original value -
rand.nextInt(A) * B
must be even, which means that
B
must be even.
So your tutor has selected B = 2, C = 51 which fulfils the "must be odd" requirement, and offsets the number so that it is 51 or greater under all circumstances. Since 51 is the first odd value greater than 50 it fits the low end of the range as well.
A controls the original range of values: 25 will indeed give you numbers from 0 to 24, so the complete expression will give values like this:
A = 0 : 0 * 2 + 51 == 0 + 51 == 51
A = 1 : 1 * 2 + 51 == 2 + 51 == 53
A = 2 : 2 * 2 + 51 == 4 + 51 == 55
...
A = 22: 22 * 2 + 51 == 44 + 51 == 95
A = 23: 23 * 2 + 51 == 46 + 51 == 97
A = 24: 24 * 2 + 51 == 48 + 51 == 99
Which fits all your criteria.