There are

total ways to draw any 6 numbers from the range 1 to 51, regardless of order.
Given 6 selected numbers that match those drawn by the lottery, there are

ways of rearranging them. So the probability of winning 1st prize is

Next, given 6 selected numbers of which 5 match those drawn by the lottery, there are

ways of rearranging those 5 matching numbers. There are 46 remaining numbers that didn't get drawn, so the probability of winning 2nd prize is
