Given the following exercise:
Let $n\in \mathbb N$. For $t\in \mathbb R$ and $M\subset \mathbb R^n$ define $$M_t = \{x\in \mathbb R^{n-1} : (x,t) \in M\}.$$ Now let $L, K\in \mathcal L^n$. Proof that if $\forall t\in \mathbb R: \lambda_{n-1}(L_t) = \lambda_{n-1}(K_t)$, then $\lambda_n(L) = \lambda_n(K)$.
Where $\mathcal L^n$ denotes the set of Lebesgue-measurable sets in $\mathbb R^n$ and $\lambda_n$ is the n-dimensional Lebesgue measure.
Now I guess a possible proof looks like
$$\lambda_n(L) = \int_\mathbb R \lambda_{n-1}(L_t)d\lambda_1 = \int_\mathbb R \lambda_{n-1}(K_t)d\lambda_1 = \lambda_n(K)$$
but I guess this is not enough (even for me it is not quite clear how these steps were made). Could someone help adding some steps to make this more rigorous?
You can use Fubini's Theorem to $\chi_L$, the characteristic function of $L$, but it seems like overkill for your question. It is enough to show that \begin{align} \lambda_n (L)=\int _{\mathbb{R}} \lambda_{n-1} (L_t) d\lambda_{1} \end{align}
We can easily show this for a rectangle, and it is extended to an open set $V$; if $V$ is a countable union of pairwise non-overlapping rectangles $\{ A_i \}$,
\begin{align} \int _{\mathbb{R}} \lambda_{n-1} (V_t) d\lambda_{1} &=\int _{\mathbb{R}}\sum _i \lambda_{n-1} (V_t \cap A_i) d\lambda_{1}\\ &=\sum _i \int _{\mathbb{R}}\lambda_{n-1} (V_t \cap A_i) d\lambda_{1}\\ &=\sum _i \lambda_{n-1} (A_i)=\lambda_n (V) \end{align} (We can change integral and sum, since every function on $t$ here is simple function.)
Now assume that $L$ is a bounded measurable set. Then there are countable open sets $\{ V_k\}$ such that $V_k \downarrow L$. Notice that $V_{k,t} \downarrow L_t $, thus \begin{align} \int _{\mathbb{R}} \lambda_{n-1} (L_t) d\lambda_{1} &=\int _{\mathbb{R}} \lim_{k\to\infty}\lambda_{n-1} (V_{k,t}) d\lambda_{1}\\ &=\lim_{k\to\infty}\int _{\mathbb{R}} \lambda_{n-1} (V_{k,t}) d\lambda_{1}\\ &=\lim_{k\to\infty} \lambda_{n}(V_{k})= \lambda_{n}(L)\\ \end{align} (Again, we can change limit and integral, since $\lambda_{n-1} (V_{k,t})$ is a sum of simple functions.)
Finally, for general case, consider $L \cap B(\mathbf{0},n)$ and take $n\to\infty$.