The underlined part of the sentence may contain an error. Choose the option that best replaces it.
I was speaking with him just now.
English pairs the verb 'speak' with 'to' when you mean you talked to a person face to face. That makes 'speaking to him just now' the clean, correct phrase.
So option 'to him just now' is the right choice.