Consider the following premises. If Mary were happy, then Jessica is a taxi driver. If John cooks, then Mary is happy. If Mary were a nurse, then John is cooking. Jessica is a taxi driver if and only if Mary is a nurse. Jessica is not a taxi driver. Can we infer the following from them? If Mary were a nurse, then John is cooking.
That is one of the premises. Therefore, the answer is yes.