Definition: Let $A$ be a set, and define $I_n=\{m\mid 1\leq m\leq n\}$ for $n\in\mathbb{N}$. It is said that $A$ is finite if there exist $k\in\mathbb{N}$ such that $A$ and $I_k$ are equinumerous. In this case, the number $k$ is called the cardinality of $A$, written $|A|$.
Then, there's a theorem that says: Let $A$ and $B$ be finite sets. If $f$ is a bijection from $A$ to $B$, then $|A|=|B|$.
My first idea is to construct two functions $f_1,f_2$ that are bijective so that $f_1\circ f_2=f$. It should be something like $A\to I_n$ and $I_n\to B$ for some $n$, but I am unable to define the right functions, as the function $f$ is not explicitly defined.
Does the other direction hold in the theorem? I.e. if $|A|=|B|$, then there's a bijection between $A$ and $B$?
Yes. Order the elements of $A$ and $B$ such that $A = \{a_1, \dots, a_n\}$ and $B = \{b_1, \dots, b_n\}$, where $n \in \mathbb{N}$ such that $|A| = |B| = |I_n|$. Now, you can define your bijection as $f(a_i) = b_i$ for all $i \in I_n$.