Let $A_n$ be a sequence of events in probability space.
The event $A(i.o.)$=$\{A_n$ happens infinitely often $\}$ is formally stated as $\lim \sup A_n$ (in other words $\cap_{k=1}^\infty \cup_{n=k}^\infty A_n$).
This is because if an element belongs to $\lim \sup A_n$, it can be shown that it belongs to infinitely many $A_n$ (because it belongs to all sets $\cup_{n=k}^\infty A_n$).
In the proof of Borel-Cantelli lemma on page 2, it says:
$P(A(i.o.)) = \lim_{k \to \infty}P(\cup_{n=k}^\infty A_n)$.
According to the definition above, it's exactly the same as
$$P(\cap_{k=1}^\infty \cup_{n=k}^\infty A_n)= \lim_{k \to \infty}P(\cup_{n=k}^\infty A_n)$$
Could anyone prove this equality?
Suppose that $B_1,B_2,\dots$ are a decreasing sequence of events. Then
$$ P\left(\bigcap_{n\ge 1} B_n\right) = \lim_{n\to\infty} P(B_n) $$
To see this define $E_{n}=B_1 \setminus B_n$. $E_n$ are measurable (i.e events) so we can assign them probability. Note also since $B_n$ is decreasing $E_n$ is increasing. We then have $ B_1=E_n \cup B_n $
and as $E_n$ and $B_n$ are disjoint
$$ P(B_1)=P(E_n)+P(B_n) \implies P(E_n)=P(B_1)-P(B_n) $$
By De Morgan's Law we also have $\bigcup E_n = B_1\setminus \bigcap B_n$. Therefore we have
$$ P\left(\bigcup E_n\right) = P(B_1)-P\left(\bigcap B_n \right) $$
Since $E_n$ is increasing, we have $P\left(\bigcup E_n \right)=\lim_{n\to\infty} P(E_n)$ (I entrust you to show this since it's a little easier, use the same technique - write the union as union of disjoint events)
Therefore
\begin{align*} P(B_1)-P\left(\bigcap B_n \right)&=\lim_{n\to\infty} P(E_n)\\ &=\lim_{n\to\infty} (P(B_1) - P(B_n))\\ &=P(B_1)-\lim_{n\to\infty} P(B_n) \end{align*}
(This result is standard for any measure space, as long as we are given that measure of the set $B_1$ is finite. But in probability space this is true for any event $B_1$)
Now apply this result to $B_k=\bigcup_{n\ge k} A_n$