Answer:
2 songs were composed by her.
Step-by-step explanation:
In passive, we put the object first, then verb to be according to the verb in active.
For example if the verb in active was present, we put (is/are)
if the verb in active was past, we put (was/were).
Then, we put by and the subject but it's not necessary, you may put it or not.