Assume the base of the triangle is horizontal at with the vertex at $(0,0)$ and length $x$. Furthermore, the triangle is right with a height $h$. Define the coordinates of the blue point as $(x_1,y)$ and the red point as $(x_2,y)$. Then, we want $x_2$ as a function of the common y-cordinate.
From basic trig, the interior angle between side x and the hypotenuse is given by $sin^{-1}\left(\frac{h}{x}\right)=\theta$. Note that when the the blue dot is at any height $y$ , $0\leq y\leq h$, drawing a vertical line from the red dot to the base forms a similar triangle with height y and base $x_2$. The angle between the base and hypotenuse will simply be $\theta$. Thus, we have from basic trig:$sin(\theta) = \frac{y}{x_2} \Rightarrow sin\left(sin^{-1}\left(\frac{h}{x}\right)\right) = \frac{y}{x_2} \Rightarrow x_2 = \frac{y\cdot h}{x}\;\;\;0\leq y \leq h$ Which gives the x-cordinate of the red point in terms of the givens.