$\textrm{Option A is wrong, why because the question is saying Y is not married with an engineer.}$
$\textrm{Option B is also wrong, Z is not married to Doctor.}$
$\textrm{Option C is also wrong, X is married to A who is a lawyer (Given in question).}$
$\textrm{Option D is true.}$
$\textrm{X$\Leftrightarrow$A(Lawyer)}$
$\textrm{Y$\Leftrightarrow$B(Doctor)}$
$\textrm{Z$\Leftrightarrow$}C(Engineer)$