$A=\{1,2,3,4,5\}$ and $B=\{1,2,3,4,5,6,7\}$ How many function $f:A\to B\text{ where (x+f(x) is odd)}$ Let A={1,2,3,4,5}
And B={1,2,3,4,5,6,7}

How many function $f$ from $A$  to $B$ are, $f:A\to B\text{ where (x+f(x) is odd)}$
What I tried to do was: 
I know that odd number + even number = odd number, and that
even number + odd number = odd number 
so I wrote:
$\begin{align}
  & |f:\{1,3,5\}\to \{2,4,6\}|+|f:\{2,4\}\to \{1,3,5,7\}|= \\ 
 & |{{3}^{3}}|+|{{4}^{2}}|=27+16=43 \\ 
\end{align}$ 
but I don't think it's the right solution, what did I do wrong?or it's the right soultion?

Nearly right.  For every one of the $27$ ways to treat the odd numbers, there are sixteen ways to treat the even numbers.  That gives $27\times16$, rather than $27+16$ different functions.
The function $$f(1)=2,f(3)=2,f(5)=2,f(2)=1,f(4)=1$$ is different from the function $$g(1)=2,g(3)=2,g(5)=2,g(2)=2,g(4)=2$$
