Is inclusion map not the same as identity?

No it isn't the identity since it isn't surjective. In the case when $B=A$ then this injection is the identity.


Recall the definition: Two functions are equal if they have the same domain, codomain and if for each $x$ in the domain they take the same value...

You are missing the bolded part.