You wanted $h:A\to C$, but when you say (for $a\in A$) that you're letting $h(a)=f(a)$, you're defining $h:A\to B$. There are other, similar errors, which amount to failing to keep track of your (co)domain(s).
You're quite correct that we can use $f:A\to B$ and $g:B\to C$ to define $h$, though. What can you say about $g\circ f$, given what you know of $f$ and $g$?
Suppose that $A$ is finite and that $f:A\to B$ is surjective. Then $B$ is finite and $|B|\le|A|$, the equality holds $\iff$ $f$ is bijective.
I found that my previous proof is ambiguous at important arguments. So I decided to rewrite it here.
Let $I_n=\{i\in\Bbb N\mid i\le n\}$. Since $A$ is finite, there is a bijection $g:I_n\to A$. Thus $f\circ g: I_n\to B$ is surjective. We define a mapping $h:B\to I_n$ by $h(b)=\min\{i\in\Bbb N\mid f\circ g(i)=b\}$.
For $b_1,b_2\in B$, $h(b_1)=h(b_2) \implies \min\{i\in\Bbb N\mid f\circ g(i)=b_1\}=\min\{i\in\Bbb N\mid f\circ g(i)=b_2\}=\bar i$ $\implies f\circ g(\bar i)=b_1$ and $f\circ g(\bar i)=b_2 \implies b_1=b_2$. Thus $h$ is injective and consequently $h:B\to h[B]$ is bijective. Moreover, $h[B] \subseteq I_n$ and $I_n$ is finite. Hence $B$ is finite. We have $|B|=|h[B]|\le |I_n|=|A|$, then $|B|\le |A|$.
The equality holds $\iff |B| = |A| \iff h[B]=I_n \iff h:B \to I_n$ is bijective. So our task is to prove $h$ is bijective $\iff f$ is bijective. As $h$ is already injective and $f$ is already surjective, our task is to prove $h$ is surjective $\iff f$ is injective.
a. $h$ is surjective $\implies f$ is injective
For $a_1,a_2\in A$ and $f(a_1)=f(a_2)=b$. Since $a_1,a_2\in A$, there exist $i_1,i_2\in I_n$ such that $g(i_1)=a_1$ and $g(i_2)=a_2$. Then $f\circ g(i_1)=f\circ g(i_2)=b$. Then $i_1,i_2\in \{i\in\Bbb N\mid f\circ g(i)=b\}$. Assume $i_2>i_1$, then $i_2>i_1\ge \min\{i\in\Bbb N\mid f\circ g(i)=b\} =h(b)$ and consequently $i_2 \neq h(b)$. $f\circ g(i_2)=b\neq b'$ for all $b'\in B$ and $b'\neq b$. Then $i_2 \notin \{i\in\Bbb N\mid f\circ g(i)=b'\}$ for all $b'\in B$ and $b'\neq b$. Then $i_2 \neq \min\{i\in\Bbb N\mid f\circ g(i)=b'\}$ for all $b'\in B$ and $b'\neq b$. Then $i_2 \neq h(b')$ for all $b'\in B$ and $b'\neq b$. To sum up, $i_2 \neq h(b')$ for all $b'\in B$. Thus $i_2 \notin \operatorname{ran}h$. This contradicts the surjectivity of $h$. It follows that $i_1=i_2$, then $g(i_1)=g(i_2)$, then $a_1=a_2$. Hence $f$ is injective.
b. $f$ is injective $\implies h$ is surjective
For $m\in I_n$, if $f\circ g(k)=f\circ g(m)$, then $g(k)=g(m)$ by the fact that $f$ is injective. Then $k=m$ by the fact that $g$ is bijective. Hence $m=\min\{i\in\Bbb N\mid f\circ g(i)=f\circ g(m)\}$. Thus $h(f\circ g(m))=m$ where $f\circ g(m)\in B$. It follows that $h$ is surjective.
Best Answer
Yes this is true, it is called Cantor–Bernstein–Schroeder theorem.