When calculating a homography with line correspondences instead of point correspondences, what is the derivation of the formula:
$$ l_i = H^T\cdot l^{'}_i $$
I know that:
$$ l^T\cdot x = 0 \quad\text{and}\quad l^{'T}\cdot x^{'} = 0\\ \text{with}\quad x^{'} = H\cdot x\\ \text{then}\quad l^{'T}\cdot H\cdot x = 0 $$
But I don't know how to continue.
You are almost there. Now, just note that your result $$0=l'^THx=(H^Tl')^Tx$$ should hold for all points on the line $l$ in the first image. As a consequence, it follows that $l\sim H^Tl'$, as desired.