When you first pick a ticket, there are 2 winning tickets and 40 total tickets. This means that there is a 2/40 chance of your ticket being a winning one. This fraction can be reduced to 1/20.
After this, there will be 1 winning ticket left and 39 total tickets. There is a 1/39 chance of the next ticket being a winning one. We multiply these two fractions together to get our answer. 1/20 * 1/39 = 1/780, so there is a 1/780 chance of having 2 winning tickets.