Solution 1.6.11.1.

There are \(5 \cdot 6^3\) functions for which \(f(1) \ne a\) and another \(5 \cdot 6^3\) functions for which \(f(2) \ne b\text{.}\) There are \(5^2 \cdot 6^2\) functions for which both \(f(1) \ne a\) and \(f(2) \ne b\text{.}\) So the total number of functions for which \(f(1) \ne a\) or \(f(2) \ne b\) or both is

\begin{equation*} 5 \cdot 6^3 + 5 \cdot 6^3 - 5^2 \cdot 6^2 = 1260 \text{.} \end{equation*}
in-context