I'm a programmer and I came across a math problem in my current project that I can't figure out.
My situation looks like this.
Everything in black is known or I know how to figure out.
AandBare the two lines of which their equations are known.his the length of the side between the two lineswis the width of the triangleIis the point where the two lines intersect
And I want to figure out the value of w
It's worth mentioning that my triangle can be any kind of triangle, not just isosceles.

Let's call your two equations $f(x)=Ax+B$ (the upper one) and $g(x)=Cx+D$.
For exactly the right $x=x_h$ they are $h$ apart. We then have $$f(x_h)-h=g(x_h)$$ from which $x_h$ can be isolated.
At their intercept, with $x=x_I$ we have $f(x_I)=g(x_I)$, from which we can isolate $x_I$.
Then $$x_I-x_h=w$$