i'm not abpilot, but is the first one not just applying sinus and cosinus? You have a triangle with the angle being 3degrees. The 10nm is the (dont know the correct english term)the longest line of the triangle. If you take cos 3 *10nm you normally become the horizontal distance between the plane and the dme station/