Sphere, triangle, and other primitive shape intersection
A sphere centered at the origin with a radius $1$ consists of all points whose distance from the origin is at most $1$. The distance between two points $(x_1,y_1,z_1),(x_2,y_2,z_2)$ is $\sqrt{(x_1-x_2)^2+(y_1-y_2)^2+(z_1-z_2)^2}$. This gives you enough information to describe the sphere: $\{ (x,y,z) : x^2+y^2+z^2 \leq 1 \}$.

A triangle with vertices $p_1,p_2,p_3$ is (by definition) the convex hull of $p_1,p_2,p_3$, which is the set of all points $a_1 p_1 + a_2 p_2 + a_3 p_3$ for $a_1,a_2,a_3 \geq 0$ satisfying $a_1 + a_2 + a_3 \leq 1$. In our case, the triangle is defined by $\{ (x,y,z) : x+y+z = 1, \; x,y,z \geq 0 \}$.

The intersection of a shape $S$ and the ray $r$ is just the set of points which belong to both $S$ and $r$. You can find these points by solving a system of equations: every point $(x,y,z)$ on the ray is of the form $x = 1-t,y = 1-t, z=1-t$ for some $t$. You can simplify this by making the substitution $s = 1-t$ to get $(s,s,s)$ instead of $(1-t,1-t,1-t)$. Now you can find the set of points in the intersection by solving a system of inequalities (I'll leave that to you). Having found the solution, the ray parameter is just the corresponding value of $t$, namely $t = 1-s$.

That should be enough to get you started.