Your answer and reasoning for problem 2 are both correct.
A password is composed of six characters. Four of them are digits (0 - 9) and two are letters (a - z). Each digit and letter can appear at most once. He remembers the letters and digits that make his password. However, he does not remember their order. What is the probability of getting the password right in a single try?
Since he knows the letters and digits used in the password, the only thing he needs to guess is the order in which they appear. There are $6!$ possible orders in which six distinct characters could appear, of which only one is correct. Hence, the probability that he guesses correctly the first time is
$$\frac{1}{6!} = \frac{1}{720}$$
A password is composed of six characters. Four of them are digits (0 - 9) and two are letters (a - z). Each digit and letter can appear at most once.What is the probability of the password having the letter a and at least one of the digits 1, 2?
There are $\binom{26}{2}$ ways to select two distinct letters, $\binom{10}{4}$ ways to select four distinct digits, and $6!$ ways to arrange six distinct characters, so there are
$$\binom{26}{2}\binom{10}{4}6!$$
possible passwords.
We will count the favorable cases using the Inclusion-Exclusion Principle.
The number of passwords which contain the letter a and the digit 1 is
$$\binom{1}{1}\binom{25}{1}\binom{1}{1}\binom{9}{3}6! = \binom{25}{1}\binom{9}{3}6!$$
since we must choose the letter a, one of the other $25$ letters, the digit 1, and three of the other nine digits, then arrange the six distinct characters.
By symmetry, the number of passwords which contain the letter a and the digit 2 is also
$$\binom{25}{1}\binom{9}{3}6!$$
However, if we add these two cases, we will have counted those cases in which the password contains the letter a and both the digits 1, 2 twice, once when we counted passwords containing the letter a and the digit 1 and once when we counted passwords containing the letter a and the digit 2. We only want to count them once, so we must subtract them from the total.
The number of passwords which contain the letter a and both the digits 1 and 2 is
$$\binom{1}{1}\binom{25}{1}\binom{2}{2}\binom{8}{2}6! = \binom{25}{1}\binom{8}{2}6!$$
since we must select the letter a, one of the other $25$ letters, both the digits 1 and 2, and two of the other eight digits, then arrange the six distinct characters.
By the Inclusion-Exclusion Principle, the number of favorable passwords is
$$\binom{25}{1}\binom{9}{3}6! + \binom{25}{1}\binom{9}{3}6! - \binom{25}{1}\binom{8}{2}6!$$
so the probability that an admissible password will contain the letter a and at least one of the digits 1, 2 is
$$\frac{2\dbinom{25}{1}\dbinom{9}{3}6! - \dbinom{25}{1}\dbinom{8}{2}6!}{\dbinom{26}{2}\dbinom{10}{4}6!} = \frac{2\dbinom{25}{1}\dbinom{9}{3} - \dbinom{25}{1}\dbinom{8}{2}}{\dbinom{26}{2}\dbinom{10}{4}}$$
Note that the answer depends only on which characters appear in the password, not the order in which they appear.
Best Answer
Before you can put the code together, you need to choose which spaces are going to be numbers and which spaces are going to be letters. There are $5$ spaces altogether (since you are making a code from $5$ symbols) and there are $2$ spaces for numbers. Therefore, there are $5 \choose 2$ ways to pick which spaces will be where the numbers go and which spaces will be where the letters go. Thus, your answer should be:
$${5 \choose 2}*10*9*26*25*24=14,040,000$$