A.
Which movie did you see last?
In sentence A.
did...see represents the past tense.
B.
Which was the last movie you saw?
Sentence B. means,
[The last movie you saw] was which?
1) Move 'was which' to the front:
was which [the last movie you saw?]
2) Invert the subject 'which' and the verb 'was':
which
was [the last movie you saw?]
'was' is the sentence's main verb; 'the last movie you saw' is the object of the main verb.
