If you know measure theory you can rewrite the integrals using the Lebesgue measure on $\mathbb{R}$, that is the unique measure on $\mathbb{R}$ s.t. $\lambda([a,b]) = b-a$ for all $a \leq b$.
Let $1_A$ denote the indicator function of A, then we can rewrite
$$\int_{-\infty}^{c}1_{[y, \infty)}(x) dx= \lim\limits_{b \ \to \ -\infty}\int_{b}^c1_{[y, \infty)}(x) dx = \lim\limits_{b \ \to \ -\infty}\int_{b}^c1_{[y, \infty)}(x)\lambda(dx) = \\
\lim\limits_{b \ \to \ -\infty}\int_{\mathbb{R}}1_{[b, c]}1_{[y, \infty)}(x)\lambda(dx) = *$$
If $y \leq c$ we get:
$$* = \lim\limits_{b \ \to \ -\infty}\int_{\mathbb{R}}1_{[\max(y,b),c]}(x) \lambda(dx) = \lim\limits_{b \ \to \ -\infty} \lambda([\max(y,b), c]) = \lim\limits_{b \ \to \ -\infty}c - \max(y,b) = c-y$$
and if $y > c$ we get:
$$* = \lim\limits_{b \ \to \ -\infty}\int_{\mathbb{R}}0 \lambda(dx) = 0$$
and similarly for the other integral one can show
$$\int_{c}^{\infty}1_{(-\infty, y]}(x)dx = \begin{cases}
0 & y \leq c \\
y-c & y > c \\
\end{cases}
$$