a)
For letters:
[tex]\begin{gathered} nCk=\frac{n!}{k!(n-k)!} \\ 26C4=\frac{26!}{4!(22)!}=14950 \end{gathered}[/tex]For numbers:
[tex]10C2=\frac{10!}{2!(8)!}=45[/tex]The number of passwords is:
[tex]14950\times45=672750[/tex]b)
For the first and the last spots
[tex]\begin{gathered} 2C1=2 \\ 3C1=3 \end{gathered}[/tex]Since we can repeat for the other spots:
[tex]10\times26\times26\times26=175760[/tex]The number of passwords is:
[tex]175760\times2\times3=1054560[/tex]