The problem in question is the following:
Let X and Y be two independent random variables whose marginal PDFs are given below. Find the pdf of X+Y.
\begin{equation} f_X(x)=1, 0\leq x\leq 1\\ f_Y(y)=1, 0\leq y \leq 1 \end{equation}
My proposition is the following:
Let $w=x+y$ then the joint pdf of both variables will become: \begin{equation} f_w(w)=\int_{-\infty}^{+\infty}f_X(w)f_Y(w-x)dx \end{equation} After we substitute $x$ for $w$ from the abovementioned conditions, we get that $0\leq w<1$ and for $f_Y:0<w-x<1\Longrightarrow x<w<1+x$ since $\max{x}=1$ and $\min{x}=0$ and because of this (I assume?) when we put this max-min back in the mentioned inequality we can get either $0<w<1$ or $1<w<2$ but I don't know whether that's the logic although that is at least how I understand it. For the case when $0\leq w<1$ the following integral $f_{X+Y}(w)=\int_0^1 1.1 dw$ is simple to derive, however, things get ridiculous when we consider the case when $1<w<2$ because then they write the following integral, in the solutions: $P_{X+Y}(w)=\int_{w-1}^{1}1.1dw$. So can someone please explain to me the logic behind all this because it seems I'm not really getting it?
If you used the correct convolution formula as I commented above, and notice that the integrand is non-zero if and only if $0 \leq x \leq 1$ and $0 \leq w - x \leq 1$, which implies that when $w > 2$ or $w < 0$ then $f_W(w) = 0$. For $0 \leq w \leq 2$, the correct integration limits are then $\max(0, w - 1)$ and $\min(w, 1)$, which gives \begin{align} f_W(w) &= \int_{\max(0, w - 1)}^{\min(w, 1)} 1 \times 1 dx = \min(w, 1) - \max(0, w - 1) \\ &= \begin{cases} w & 0 \leq w \leq 1, \\[1em] 2 - w & 1 < w \leq 2. \end{cases} \end{align}
To summarize, the density of $W$ is \begin{align} f_W(w) = \begin{cases} w & 0 \leq w \leq 1, \\[1em] 2 - w & 1 < w \leq 2, \\[1em] 0 & w < 0 \text{ or } w > 2. \end{cases} \end{align} You can verify that $\int_{\mathbb{R}} f_W(w) dw = 1$.
Alternatively (which I prefer, but for this problem may be more cumbersome than applying the convolution formula directly), $f_W$ can be determined by first calculating the distribution function $F_W$ of $W$ as follows: \begin{align} F_W(w) &= P[X + Y \leq w] = \int_0^1 P[x + Y \leq w]dx = \int_0^1P[Y \leq w - x]dx \\ &= \begin{cases} 0 & w < 0, \\[1em] \int_0^w(w - x)dx & 0 \leq w < 1, \\[1em] \int_0^{w - 1} 1 dx + \int_{w - 1}^1 (w - x)dx & 1 \leq w < 2, \\[1em] 1 & w \geq 2. \end{cases}\\ &= \begin{cases} 0 & w < 0, \\[1em] \frac{1}{2}w^2 & 0 \leq w < 1, \\[1em] 2w - \frac{1}{2}w^2 - 1 & 1 \leq w < 2, \\[1em] 1 & w \geq 2. \end{cases} \end{align} $f_W(w)$ can then be obtained by differentiating $F_W(w)$ with respect to $w$: \begin{align} f_W(w) = F_W'(w) = \begin{cases} w & 0 \leq w < 1, \\[1em] 2 - w & 1 \leq w < 2, \\[1em] 0 & w < 0 \text{ or } w \geq 2. \end{cases} \end{align}