The prompt is to find the number go surjections $f$ mapping $\{1, 2, \dotsc , 13 \}$ onto $\{1, 2, \dotsc , 10\}$ such that for every $x \in \{1, 2, 3\}$, $|f^{-1}(\{x\})| = 2$ and for every $x \in \{1, 2, \dotsc, 12\}$, $f(x) \neq x+1$.
The way I solved this problem was splitting it into two parts.
Let $A = \{1, 2, \dotsc, 13\}$ and $B = \{1, 2, \dotsc, 10\}$.
For $x \in \{1, 2, ..., 12\}$, $f(x) \neq (x + 1)$:
So there are $12$ elements elements that can't be mapped onto $B$ from $A$ which are one more that the element. Since there are only $10$ elements in $B$, there are $9$ elements which can't be mapped onto $B$. e.g. $f(1) \neq 2, f(2) \neq 3, \dotsc, f(9) \neq 10$.
Using permutations we know that there are $13^{10} - 9$ such ways.
For $x \in \{1, 2, 3\}$, $|f^{-1}(\{x\})| = 2$:
This means for elements $1$, $2$ and $3$ in $B$, the function $f$ should map to element $2$ in $A$.
This is possible in choosing $3$ elements in $B$ as $\binom{10}{3}$ ways and mapping onto $1$ elements on $A$ chosen in $\binom{13}{1}$ ways, making it $\binom{10}{3}\cdot\binom{13}{1}$ ways to do this? Or should it be only $3$ ways?
Making the final solutions the sum of $2$ answers we found, but I'm not sure if I'm on the right path.
Edit
I tried attempting this problem using inclusion-exclusion principle making 3 cases,
For x = 1, $f^{-1}(1)$ can be chosen in $\binom{13}{2}$ ways, since x-1 = 0 cannot be chosen, which doesn't exist anyways.
For x = 2, $f^{-1}(1)$ can be chosen in $\binom{12}{2}$ ways, since x-1 = 1 cannot be chosen hence have 12 elements in A.
For x = 3, $f^{-1}(1)$ can be chosen in $\binom{12}{2}$ ways, since x-1 = 2 cannot be chosen hence have 12 elements in A.
Now for conditions 1 and 2 together, $f^{-1}(1)$ and $f^{-1}(2)$ can be chosen in $\binom{13}{2}\cdot\binom{11}{2}$ ways, since after mapping 2 elements from A to x = 1, we are left with 11 elements, for x = 2 to choose, from which we cannot choose the element 1 since 2-1 = 1.
Following the same pattern, we have
$f^{-1}(2)$ and $f^{-1}(3)$ = $\binom{12}{2}\binom{11}{2}$
$f^{-1}(1)$ and $f^{-1}(3)$ = $\binom{12}{2}\binom{11}{2}$
$f^{-1}(1)$, $f^{-1}(2)$ and $f^{-1}(3)$ = $\binom{13}{2}\binom{10}{2}\binom{7}{2}$
Final solution can be written as $S = C_0 - C_1 + C_2 - C_3$ Where $C_0 = 10^{13}$ is all possibilities Hence $$S = 10^{13} - [\binom{13}{2} + \binom{12}{2} + \binom{13}{2}] + [\binom{12}{2}\binom{11}{2} + \binom{12}{2}\binom{11}{2} + \binom{12}{2}\binom{11}{2}] - [\binom{13}{2}\binom{10}{2}\binom{7}{2}]$$
I'm afraid you've misunderstood something quite critical. In general, if $f:A\to B$ and $C\subseteq B,$ then the preimage of $C$ (with respect to $f$) is the set of all elements of $A$ mapped to $C$ by $f,$ which we denote (and define symbolically) by $$f^{-1}(C)=\{a\in A:f(a)\in C\}.$$
Consequently, $$\left\lvert f^{-1}\bigl(\{x\}\bigr)\right\rvert=2$$ means that exactly two elements of $A$ are mapped to $x$ by $f.$ For example, we could have $f^{-1}\bigl(\{1\}\bigr)=\{1,13\},$ $f^{-1}\bigl(\{2\}\bigr)=\{5,6\},$ $f^{-1}\bigl(\{3\}\bigr)=\{2,12\}.$
As an immediate consequence of this condition (plus surjectivity), this means that for $x\in\{4,5,...,9,10\}$ we will have $$\left\lvert f^{-1}\bigl(\{x\}\bigr)\right\rvert=1.$$ Our other condition then says that we want $$f^{-1}\bigl(\{x\}\bigr)\neq\{x-1\}$$ for each $x\in\{4,5,...,9,10\}.$ Can you see why?
We also want $x-1\notin f^{-1}\bigl(\{x\}\bigr)$ for $x\in\{2,3\},$ which my example above does not satisfy. Can you see why we need this, and why my example doesn't satisfy it? Can you take it from there?
Edit: You've made some good progress! There are still some issues with your solution, though.
You've got the right idea, here, but your conclusion is not correct. Since we cannot allow $1$ to be an element of $f^{-1}\bigl(\{2\}\bigr),$ then we may have eleven elements to choose from, but only if $1\in f^{-1}\bigl(\{1\}\bigr).$ Otherwise, we'll have ten elements left to choose from. This leaves us needing to proceed by cases, which isn't very compatible with inclusion-exclusion. Similar issues occur with the rest of your attempt.
I will suggest again, as I did in the comments, that you first determine how many surjections $A\to B$ satisfy the condition $f(x)\neq x+1$ when $x\in\{1,2,...,12\},$ then exclude those which fail to satisfy the other condition.