Final answer:
The vagus nerve (CN X) is responsible for motor function of the pharynx and larynx. The nuclei of the glossopharyngeal nerve (CN IX) and the hypoglossal nerve (CN XII) are involved in motor function of the pharynx and larynx.
Step-by-step explanation:
The cranial nerve responsible for motor function of the pharynx and larynx is CN X, also known as the vagus nerve. It is composed of both sensory and motor fibers and connects to muscles of the face, oral cavity, and pharynx, controlling functions such as swallowing and speech. In terms of nuclei, the motor functions of the pharynx and larynx are primarily controlled by the nuclei of the glossopharyngeal nerve (CN IX) and the hypoglossal nerve (CN XII).