How to prove that if $A\subseteq B$and $|A|=|B|$, then $A=B$ Apart from the question in the title, the other question that related to the first question: Define: $f(X)=${$f(x)|x\in X$}. if $X$ is finite, $f(X)\subset X$ and $f$ is one to one, then $|f(X)|=|X|$, and according to the statement in the first question, $f(X)=X$. Then if $X$ is infinite, why could it be that $f(X)\neq X$ even if $f$ is one to one? 
Note:"$|A|$" represents the number of elements in the set A.
If $A$ and $B$ are infinite, we may have $|A|=|B|$ but still $A \ne B$. 

Let $A=\mathbb N = \{ 0,1,2,... \}$ and $B = \{ 0,2,4,...\}$; we have the one-to-one mapping (but not onto) $f : A \rightarrow B$ such that $f(n)=2n$ (Galileo dicovered it), but clearly $A \ne B$ ($B \subset A$, with proper inclusion).
$$
\text{First, I think your question is wrong}
$$
$$
A\subset B\quad \text{should be}\quad A\subseteq B
$$

$$
\text{Here is my proof}
$$
$$\text{Assume } A \neq B$$
$$\because A \subseteq B$$
$$\Rightarrow \forall a \in A \mid a \in B \tag{1}$$
$$A \neq B \tag{2}$$
$$(1)\quad \text{and} \quad (2)\Rightarrow \exists b \in B \mid b \notin \tag{3}A$$
$$(1)\quad and\quad(3) \Rightarrow\vert A \vert \neq \vert B \vert $$
$$\Rightarrow \text{Our assumption is false}$$
$$\Rightarrow A = B$$