"did" and 'have' are both possible, but there is a slight difference in meaning between, "Where have you put my dictionary?" and "Where did you put my dictionary?" The tense used in the second sentence, the reply to the question in your example, determines that the correct choice is "have".
Another way of constructing the second sentence which makes it clearer why 'were speaking" is correct, would be:
I left it on your desk because you were busy speaking to Tom and I didn't want to interrupt you."
I'm sure you have questions about this. Fire away. I'm sure you will generate a number of responses.
Student or Learner