Translate the following inference to logic notation: If Sarah drinks water, then Joseph is writing a letter. If James drives a car, then Sarah is drinking water. If Joseph writes a letter, then James is driving a car. Therefore if James drives a car, then Joseph is writing a letter.
p -> q. r -> p. q -> r. Therefore r -> q.