I've been on this problem for an entire day. The only thing I learnt is that $O$ is between $A$ and $B$, I feel like I am missing something simple.
Make a parallel copy of the line, containing points $A', B',C', D'$. Let $Q$ be the intersection of $A'C$ and $B'D$. Then for any line $\ell $through $Q$, let $O'$ and $O$ be the intersection points with the two parallel lines. Then $O'A':O'B'=OC:OD$. Now what you want is that $O'$ is the parallel copy of $O$, i.e., take $\ell$ perpendicular to the given line (i.e., parallel to $AA'$).