You can count all these functions by inclusion/exclusion. Let $\cal U$ be the set of all functions $f$ from $A=\{1,\ldots,6\}$ onto $B=\{1,\ldots,6\}$ with the property that $f(1)=2$. As $f$ is to be onto, other values of $f(k)$ are obtained by writing down the numbers $1,3,4,5,6$ in some order: there are $5!$ possibilities.
Note that since $A$ and $B$ are of the same size, every onto function is one-to-one as well.
Now for $k=1,\ldots,6$, write
$$F_k=\{f\in{\cal U}\mid f(k)=k\}\ .$$
Obviously $F_1=\varnothing$; since functions in $\cal U$ are one-to-one, $F_2=\varnothing$ too. So the number of functions we want to count is
$$|\overline{F_3}\cap\cdots\cap\overline{F_6}|
=|{\cal U}|-|F_3|-\cdots+|F_3\cap F_4|+\cdots\ .$$
The functions in $F_3$ satisfy $f(1)=2$, $f(3)=3$, other $f(k)=1,4,5,6$ in some order; so $|F_3|=4!$. Doing other terms in the same way gives the required number as
$$5!-4\times4!+6\times3!-4\times2!+1!\ .$$