$d: (m-1)x-y+1=0$
$\to d(O; d)=\dfrac{ | 0(m-1)-0+1| }{\sqrt{(m-1)^2+1}}$
$=\dfrac{1}{\sqrt{(m-1)^2+1}}$
$d(O;d)\max\Leftrightarrow \sqrt{(m-1)^2+1}\min$
$\sqrt{(m-1)^2+1}\ge \sqrt1=1$
$\to \sqrt{(m-1)^2+1}\min\Leftrightarrow m-1=0$
$\Leftrightarrow m=1$