The correct answer is option (B):
to him just now
The correct answer is "to him just now."
The verb "speak" is often followed by the preposition "to" when indicating the person being addressed. The phrase "speaking with him" is grammatically incorrect in this context. We use "speaking to someone" to convey the action of talking or conversing with that person.
The other options are incorrect because:
* "on him" is not used in this context. The correct preposition with "speaking" to indicate the person talked to is "to."
* "for him" implies speaking on someone's behalf or in their interest, which isn't the meaning intended in the original sentence.
* "him" by itself is grammatically incorrect after the verb "speaking." While "speaking him" could be used with a different meaning (e.g., "speaking the truth"), it is not appropriate here.