EDIT 3: (EDIT1 / EDIT2 are withdrawn due to an error found.)
As queried in my comments options so far not replied by OP, I assume that points P and Q are given as fixed, and the interface direction is given,but it is not required to pass through any given point. Accordingly, given temporary interface direction straight line L can be parallelly displaced to pass through a point of incidence I, yet to be found out.
Label I is used instead of O to avoid imagining point of incidence as fixed at origin.
Draw parallel and perpendicular directions to L passing through P and Q so that they intersect at C.Divide PC in the ratio $ n_2 : n_1 $ in the usual way ( Draw $ n_2 , n_1 $ inches or centimeters from a corner and draw parallels for such proportionate division of line L into two segments). Draw line NN parallel to QC. Let the perpendicular bisector of PQ intersect NN at I, the point being sought.Draw line XX parallel to PC. Now XX is the interface straight line.Since $ PI= QI $,
Special Case when P and Q are given with respect a given fixed horizontal Interface (slope L = 0):
It is easier. Divide horizontal projection of PQ in the ratio $ n_2:n_1 $ to draw vertical line NN. The perpendicular bisector of PQ cuts NN at desired point I.
$ \dfrac{\sin i}{\sin r}= \dfrac{\sin \theta_1}{\sin \theta_2} = \dfrac {PN/PI}{QN/QI} = \dfrac{PN}{QN} = \dfrac{n_2}{n_1} = \mu. $
The interface cannot be a fixed line. I had earlier answered the question in German newsgroup de.sci.mathematik.
The one and only way for a ray of light to travel between two given fixed points is to have an interface curve shaped as one among curved confocal Cartesian Ovals. This is a direct geometric consequence of Fermat's Law.
In other words perpendiculars onto correctly positioned interface normal should be in ratio $ n_2/n_1. $
