We will now show that the self-intersection curve crosses itself at right angles at the point (4, 0, 0).
Here is one way to do it:

Since the cylinder requires that r = 4 cos θ, we can substitute for r in the expression for the curve r. We obtain r = (4 cos θ cos θ)i + (4 cos θ sin θ)j + zk.
What can we do about that z? According to the sphere, we must have z = (16 − r2)1/2. Substituting r = 4 cos θ into the equation for z, we get z = (16 − (4 cos θ)2)1/2 = (16 − 16 cos2 θ)1/2 = 4 sin θ. We can now write our curve with θ as our parameter:
r(θ) = (4 cos θ cos θ)i + (4 cos θ sin θ)j + (4 sin θ)k.
Observe that r(0) = 4i and r(π) = 4i, indicating that the curve intersects itself for θ = 0 and θ = π. If we find the tangent vectors at these two points, the angle between them is supposed to be a right angle. Of course, the easiest way to find tangent vectors is to use r′(θ), the velocity vector:
r′(θ) = (−8 cos θ sin θ)i + 4( cos2 θ − sin2 θ)j + (4 cos θ)k.
Plug in θ = 0 and θ = π to find the pertinent tangent vectors:
r′(0) = 4j + 4k
r′(π) = 4j − 4k.
If we dot these vectors we get zero. The vectors are perpendicular, so the intersection curve crosses itself at ninety degrees. QED.