For sets $A$ and $B$ we make these definitions:
$|A|\leq |B|$ : There is an injective function $f:A\rightarrow B$.
$|A| < |B|$ : There is an injective function $f:A\rightarrow B$ but no injective function $g:B\rightarrow A$.
$|A| = |B|$ : There is a bijective function $f:A\rightarrow B$.
From these definitions, the following (nontrivial) facts can be proven:
i) If $|A|\leq |B|$ and $|B|\leq |A|$ then $|A|=|B|$.
ii) If $|A| \leq |B|$ and $|B|\leq |C|$ then $|A|\leq |C|$.
These facts (and similar ones) allow us to manipulate set inequalities in intuitive ways.
As shorthand, we sometimes write $|A|<\infty$ to mean "$A$ is a finite set." We sometimes write $|A|=\infty$ to mean "$A$ is an infinite set." These statements are not intended to be used in the above injection/bijection set inequalities because they are not precise enough: The equation $|A|=\infty$ does not tell us that there is a bijection from set $A$ to set $\infty$ because it does not specify what is meant by "set $\infty$." As you know, there are different infinite sets, and some are "bigger" than others.
So we certainly cannot conclude that if $|A|=\infty$ and $|B|=\infty$ then $|A|=|B|$ (that would be incorrectly claiming that if $A$ and $B$ are infinite sets then there is a bijection between them). Also, if $|A|=\infty$ and $|B|=\infty$ but $|A|<|B|$, it does not make sense to conclude $\infty < \infty$ (as the inequality $\infty < \infty$ does not have any meaning). Rather, the statement $|A|=\infty$ and $|B|=\infty$ but $|A|<|B|$ just means that $A$ and $B$ are both infinite sets, there is an injection from $A$ to $B$, but no reverse injection. To avoid confusion, you could simply avoid using expressions like $|A|=\infty$ when dealing with set inequalities, rather just say "$A$ is an infinite set."