So I'm currently programming a shader in hlsl (more specifically, shaderlab, unity's version of hlsl) where I want to simulate rocket engine's plumes. These plumes tend to follow an equation that I simplified quite a lot to be (where $A$ represents the linear expansion and $B$ represents the quadratic expansion of the plume)
$$f(x) = \text{Radius}+(x*A) + (x^2 * B)$$
and the ray function would be
$$f(x) = \text{RayOrigin} + \text{RayDirection} * x$$
These being in $3D$ space, where the plume function will be rotated $360^\circ$ around the origin, I'm looking for a way to find the 1st and 2nd intersections of the ray function with the plume function. The ideal formula would be to find the ray function's $x$ given that I have the $\text{Radius}$,$\text{RayOrigin}$, $\text{RayDirection}$, $A$ and $B$



Unfortunately, I am unable to comment because I have under 50 reputation. However, I will try to answer your question. I'm not sure what you mean by the "plume function will be rotated 360º around the origin"; I assume it is fixed at that orientation.
Finding the intersection is simply to find the points where the outputs of the 2 functions are equal.
$$\text{Plume}(x) = \text{Ray}(x)$$ $$Bx^2+Ax+\text{Radius} = \text{RayDirection}\cdot x + \text{RayOrigin}$$ $$B\cdot x^2+(A-\text{RayDirection}) \cdot x+(\text{Radius}-\text{RayOrigin})=0.$$
Now it is simply a matter of applying the quadratic formula $$x_{1,2} = \frac {-b \pm \sqrt{b^2 -4ac}} {2a}$$ with $a=B$, $b=A-\text{RayDirection}$ and $c=\text{Radius} - \text{RayOrigin}$.
You can find the number of solutions using $\Delta = b^2-4ac$. We have the 3 cases:
which you can use to determine whether or not to try to compute solutions.
Edit: here are the equations for the plume and line intersection: \begin{cases} x^2+z^2=(\text{Plume}(y))^2 \\ x=x_0-x_1+ta \\ y=y_0-y_1+tb \\ z=z_0-z_1+tc \\ \end{cases} where the parametric form of a line passing through $(x_0,y_0,z_0)$ with direction $(a,b,c)$ is used. This is assuming the plume is placed at $(x_1,y_1,z_1)$ in global coordinates and revolved around the y-axis. You can plug in the equation into a numerical root finder such as Newton's method or the more stable ITP method to find solutions of $t$, which you can use to find the points of intersection by plugging $t$ into the equation of the line $\vec v = (x_0,y_0,z_0) + t(a,b,c)$. Also, there can be more than 2 intersections as you can see from the equation. I believe there can be up to 3, but since the first equation yields a 4-th degree equation in $t$ there might be cases with 4 solutions, I am not too sure.