This problem is from a textbook. I have no idea where to begin.
The textbook gives a lead: "The second greatest (variable) is smaller than $t$ if two or three of the $X$-variables are smaller than $t$. What distribution does the variable $Y$, that counts how many of the $X$-variables are smaller than $t$, have?
The answer the book gives is: $f(y) = 6\times y(1 - y), 0 < y < 1$
My thought was to begin by getting the distribution function of $Y$, which I initially decided was $y/3$, but I think this is wrong.
Let $Y$ be the second largest of the $X_i$'s. As the hint says, $$P(Y<t)=\binom {3}{2}P(X_1<t,X_2<t,X_3>t) +P(X_1<X_1<X_3<t)$$ [since $P(X_1<t,X_2<tX_3>t)$ does not change if you permute $X_1,X_2,X_3$]. So, $$P(Y<t)=3t^{2}(1-t)+t^{3}.$$ Differentiation gives $f_Y(t)=6t-6t^{2}=6t(1-t)$ for $0<t<1$.