A big part of the question above has already been answered: "Use the calc tikzlibrary and the let syntax".
\begin{tikzpicture} \draw [help lines] (0,0) grid (4,4); \node (A) at (2,1) {A}; \path let \p1 = (A) in node at (\x1,3) {B}; \end{tikzpicture}
But it leaves out something else. How do I use the let syntax inside a \draw directive? Like so:
\draw
(5,0) node(A){}
let \p1 = A % This line borks everything. What is the right thing to do?
(0,5) -- (\x1,5)
;

