[I may have some things off by $90^\circ$ here or have $\sin$ and $\cos$ swapped, but I think you’ll get the idea.]
If you rotate the stationary pipe through a full $360^\circ$, you would get this sort of funnel-like shape, where the angle between the horizontal pipe and the funnel is $180^\circ$ minus the angle by which your pipe has been bent. That’s the angle between the green and orange parts here, and they illustrate your pipe’s current position. [Mark McClure made a great animation of this in his answer!.]
![enter image description here](https://i.stack.imgur.com/ItqRq.png)
So first, measure the angle by which the pipe is bent (about $20^\circ$ in this picture) and call it $B$.
Identify points in this picture with the origin at the bend, the positive $x$-axis going left, the $y$-axis going up, and the $z$-axis going towards you.
A circle on the cone is then the set of points $(x_0,x_0\sin \theta\tan B,x_0\cos \theta\tan B )$, where $\theta$ is the angle around the cone, with $\theta=0$ towards you and $\theta$ increasing counter-clockwise when looking into the funnel from the left.
So the bent part of the pipe lies along the ray with parametric equations $(x,x\sin \theta\tan B,x\cos \theta\tan B )$ for $x\ge0$ for some fixed $\theta$.
Now, figure out $\theta$ for your pipe. Here, it’s about $-30^\circ$.
If you got the angles right, the angle you see in the top view should match what it is mathematically. Since a top view basically ignores the $y$ coordinate, the tangent of the angle the pipe appears to make when viewed from the top is the slope of the line $z=x\cos \theta\tan B$. That slope is $\cos \theta\tan B$, so the angle you see is $\arctan(\cos \theta\tan B)$.
The angle from the side view is the angle seen when ignoring the $z$ coordinate, so it’s $\arctan(\sin \theta\tan B)$
The angles you’re looking for (the top-view angle after rotations) are then
$$\arctan(\cos (\theta+11^\circ)\tan B)\mbox{ and }\arctan(\cos (\theta-11^\circ)\tan B)$$.
The shortest distance between the blue point and the given line is measured along the perpendicular to that line through the blue point. Geometrically, this is a basic compass-and-straightedge construction.
Analytically, there are several ways to go about this. We’ll do it by translating the geometric construction above into analytic terms. Assume for the moment that the given line is neither vertical nor horizontal. Its equation is $y=-x\tan\theta$, where $\theta$ is the rotation angle. The negative sign appears because you’re taking positive angles as clockwise, which is the opposite of the usual sign convention for a right-handed coordinate system. Let the coordinates of the blue point $B$ be $(x_b,y_b)$. Two lines are perpendicular if the product of their slopes is $-1$, therefore the equation of the perpendicular line through $B$ is $y-y_b = (x-x_b) \cot\theta$. Now, solve for the intersection point, giving $$ x=(x_b\cos\theta-y_b\sin\theta) \cos\theta \\ y=(y_b\sin\theta-x_b\cos\theta) \sin\theta.$$ You can then use the formula for the distance between two points to get, after some simplification, $|x_b\sin\theta+y_b\cos\theta|$ for the distance from $B$ to the line.
We can’t use this derivation for a horizontal or vertical line because one of the slopes is infinite, but a slight modification to the equation of the line handles those cases, too. Expand $\tan\theta$ as ${\sin\theta\over\cos\theta}$ in the equation of the line, multiply through by $\cos\theta$ and rearrange to get $x\sin\theta + y\cos\theta = 0$. A similar transformation produces $(x-x_b)\cos\theta-(y-y_b)\sin\theta=0$ as the equation of the perpendicular. The rest of the derivation proceeds the same way as above.
Notice that the distance of $B$ from the line is just the absolute value of what you get from plugging its coordinates into the more general equation of the line. This can be generalized: Given the equation of any line $ax+by+c=0$, not necessarily passing through the origin, the distance of a point $(x_0,y_0)$ from it is given by $${|ax_0+by_0+c| \over \sqrt{a^2+b^2}}.$$ I’ll leave proving this more general formula to you. One way to prove it follows the same steps as the above construction for a line through the origin.
Best Answer
You have two equations for $f$ and $g$: $$ f:(4+g)=1:3 $$ (from triangle similarity) and $$ f^2+1=g^2 $$ (from Pythagoras' theorem).