Prove two sets have same Cardinality by writing down bijection

Hint for a. We want to use simple functions. Let's use a linear function $f: A \to B$. Find a linear function

$$ f(x) = ax + b$$

such that $f(1) = 1$ and $f(3) = 5$.

Hint for b. Can you find a bijection $g: A \to \mathbb{N}$? And do you remember a bijection $h: \mathbb{N} \to \mathbb{Z}$? Then you can simply combine those and obtain a bijection $h \circ g: A \to \mathbb{Z}$.