Diagram of the triangle. My attempt:
For $f(x) = 0$ for $x < 0$ or $x > 1$.
For $x = 0$, $f(x) = \sqrt{2}$ (the length of the $y-z$ side). For $x = 1$, $f(x) = 0$. So when $0 \leq x \leq 1$, $f(x) = -\sqrt{2}x + \sqrt{2}$.
However, I'm not convinced this is correct because from the diagram I feel as though $P(0.49\leq x \leq0.5)$ should be the same as $P(0.79\leq x \leq 0.8)$, for example.
Your space triangle projects with constant area scalation to the triangle $$T:=\bigl\{(x,y)\>\bigm|\>0\leq x\leq 1, \ 0\leq y\le 1-x\bigr\}$$ in the $(x,y)$-plane. The probability that a random point $(X,Y,Z)\in T$ satisfies $$X\leq x\qquad(0\leq x\leq 1)$$ therefore is given by $$P(X\leq x)={\int_0^x(1-t)\>dt\over {\rm area}(T)}=2x-x^2\qquad(0\leq x\leq1)\ .$$ The probability density $f_X$ therefore is given by $$f_X(x)=0 \quad \bigl(x\notin[0,1]\bigr), \qquad f_X(x)={d\over dx}P(X\leq x)=2-2x \quad (0\leq x\leq1)\ .$$