Let $A = {1,2,3,4,5}$ and $B = {0,1,2}$. Find the number of pairs of functions ${{f,g}}$ where both f and g map the set A into the set B and there are exactly two elements $x \in A$ where $f(x) = g(x)$. For example, the function f that maps $1 \rightarrow 0,2 \rightarrow 1,3 \rightarrow 0,4 \rightarrow 2,5 \rightarrow 1$ and the constant function g which maps each element of A to 0 form such a pair of functions.


Let's think step by step and output the final answer within \boxed{}.
user