my lecturer wrote a solution for our exam, and he wrote the eigenvalue formula as $|\lambda I-A |$ instead of $|A-\lambda I|$. What I understand is we use the latter to get the eigenvalue of a matrix.
Is this a typo or it doesn't matter whether it's $|A-\lambda I|$ or $|\lambda I-A |$?
Thanks

Both are actually equivalent!
Let us recall how we derive the notion of eigenvalues and such. That is, for a square matrix $A$ and eigenvalues $\lambda$ of $A$, we have:
$$A\vec{x} = \lambda \vec{x}$$
Then,
$$A\vec{x} - \lambda \vec{x} = 0 \;\;\; \Rightarrow \;\;\; (A-\lambda I) \vec{x} = 0$$
Then we try to find $\lambda$ such that $det(A - \lambda I) = 0$.
But wait! We can do this a different way, as:
$$A\vec{x} = \lambda \vec{x} \;\;\; \Rightarrow \;\;\; 0 = \lambda \vec{x} - A \vec{x} \;\;\; \Rightarrow \;\;\; 0 = (\lambda I - A) \vec{x}$$
and thus we seek $\lambda$ such that $det(\lambda I - A) = 0$
Thus, as a result, you can use either equation - $det(\lambda I - A) = 0$ or $det(A - \lambda I) = 0$. Which you use is a matter of personal taste; I was actually taught the former but found the latter more intuitive.