Passengers probability problem There is a train with $m$ wagons and $n$ $(n\geq m)$ passengers. Calculate the probability where for every wagon there is at least one passenger to enter.
Let $A$ be "there is a passenger on every wagon", $A_k$ be "there is a(t least one) passenger on the $k$-th wagon".
If we want $A$ to be realized, every $A_k$ have to realize: $A = \bigcap_{k=1}^{m} A_k.$
De Morgan's laws: $\overline{A}= \bigcup_{k=1}^{m} \overline{A_k}$, where $\overline{A_k}$ is "there are no passengers on the $k$-th wagon".
After this step I couldn't follow my probability teacher so if anyone could explain it to me, I would be very very grateful:
$P(\overline{A_i}) =\frac{(m-1)^n}{m^n}$, $P(\overline{A_i}\overline{A_j}) = \frac{(m-2)^n}{m^n}$ etc. After this we could conclude that in every wagon can be $n$ passengers, but I don't think it's the case. What does it actually mean?
 A: Choose 1 bin that is empty and allocate all passengers to the remaining $m-1$. Repaeat $m-1$ times. This comes up to $\binom{m}{1} (m-1)^n$ times. For each such allocation you have over counted any two bins, so need to subtract $\binom{m}{2}( m-2)^n$. Now you have over counted three bins, need to add them back. And so on. Can you take it from here?
A: 
"After this step I couldn't follow my probability teacher so if anyone could explain it to me..."

I grasp your question as an opportunity to explain the principle of PIE. This also to have an answer that I can use eventually as a reference by answering later questions. Often I see proofs of PIE that use induction and are connected with a specific measure and I regret that. This because PIE has a nice base in indicator functions and is surprisingly easy to prove in that context. Only at one spot induction is very welcome, which is the (omitted) proof that for a non-empty finite set the number of subsets with even cardinality equals the number of subsets with odd cardinality.
You can make use of corollary 2 by taking $P$ for $\mu$ and $A_i^{\complement}$ for $B_i$.

Theorem:
Let $I$ be a finite set and for every $i\in I$ let $B_{i}\subseteq\Omega$.
Then: $$\mathbf{1}_{\bigcup_{i\in I}B_{i}}+\sum_{\varnothing\neq K\subseteq I\wedge\left|K\right|\text{even}}\mathbf{1}_{\bigcap_{i\in K}B_{i}}=\sum_{K\subseteq I\wedge\left|K\right|\text{odd}}\mathbf{1}_{\bigcap_{i\in K}B_{i}}$$
Proof of theorem:
Fix some $\omega\in\Omega$ and let $I\left(\omega\right):=\left\{ i\in I\mid\omega\in B_{i}\right\} $.
If $I\left(\omega\right)=\varnothing$ then substitution of $\omega$
on both sides leads to: $$0+0=0$$ which is evidently a true statement.
If $I\left(\omega\right)\neq\varnothing$ then $\mathbf{1}_{\bigcup_{i\in I}B_{i}}\left(\omega\right)=1$.
Secondly it is not difficult to prove that: $$\left|\left\{ K\subseteq I\left(\omega\right):\left|K\right|\text{ is even}\right\} \right|=2^{\left|I\left(\omega\right)\right|-1}=\left|\left\{ K\subseteq I\left(\omega\right):\left|K\right|\text{ is odd}\right\} \right|$$
Concerning even cardinality we only take into account the subsets
that are not empty so substitution of $\omega$ on both sides leads
to: $$1+\left(2^{\left|I\left(\omega\right)\right|-1}-1\right)=2^{\left|I\left(\omega\right)\right|-1}$$
which again is evidently a true statement.
This completes the proof.

Corollary 1:
Let $\left(\Omega,\mathcal{A},\mu\right)$be a measure space, let
$I$ be a finite set and for every $i\in I$ let $B_{i}\in\mathcal{A}$.
Then: $$\mu\left(\bigcup_{i\in I}B_{i}\right)+\sum_{\varnothing\neq K\subseteq I\wedge\left|K\right|\text{even}}\mu\left(\bigcap_{i\in K}B_{i}\right)=\sum_{K\subseteq I\wedge\left|K\right|\text{odd}}\mu\left(\bigcap_{i\in K}B_{i}\right)$$
Proof of corollary 1:
Apply the theorem and afterward take the integral wrt to $\mu$ on both sides.

Corollary 2 (application of symmetry):
Let $\left(\Omega,\mathcal{A},\mu\right)$be a measure space, let
$I=\left\{ 1,2,\dots,n\right\} $ be a finite set and for every $i\in I$
let $B_{i}\in\mathcal{A}$.
Moreover let it be that $\mu\left(\bigcap_{i\in K}B_{i}\right)$
only depends on the cardinality of $K$.
Then: $$\mu\left(\bigcup_{i\in I}B_{i}\right)+\sum_{1\leq m\leq\lfloor\frac{1}{2}n\rfloor}\binom{n}{2m}\mu\left(\bigcap_{i=1}^{2m}B_{i}\right)=\sum_{1\leq m\leq\lceil\frac{1}{2}n\rceil}\binom{n}{2m-1}\mu\left(\bigcap_{i=1}^{2m-1}B_{i}\right)$$
Proof of corollary 2:
Straightforward.

