1) We don't do homework questions here. There's a reason it has been assigned to you.
2) The "right" answer to this specifically and only depends on your class and textbook. There are many different (and incompatible) ways to analyze passives (and other structures), and the "right" one, including general approach and various details, will vary a lot from class to class. Your instructor may have also simplified it in some way for you.
My guess is that there is some kind of movement transforming an active-like sentence to passive form, but the details can get complicated (and sometimes passives are not analyzed with that type of movement at all). Discussing it here would be inappropriate for your class, and probably more confusing/complicating than helpful.