To define a line we need 2 points. In dihedral, we join their matching projections.
How the traces are found
Traces are the points where the line cuts the projection planes. There is nothing to calculate: they are read from the projections.
Horizontal trace H: where r″ crosses the ground line, drop a perpendicular to r′. That point is H′ (which is H itself, because it lies on the PH). Its vertical projection H″ falls on the ground line, on the same vertical: H′ and H″ are not the same point.
Vertical trace V: where r′ crosses the ground line, raise a perpendicular to r″. That point is V″ (V itself). Its horizontal projection V′ falls on the ground line.
A line parallel to a plane has no trace with that plane: a horizontal line does not cut the PH and a frontal line does not cut the PV.
A profile line needs the third view to locate its traces without ambiguity.