Let us see how it works.
a) First of all "parts" is a weak entity , so it is in "many" side of the weak relationship "belongs to" .Also this entity is in "many" side of the relationship "maintained by".
b) Now as it is a many to one relation in both cases : i) From "parts" to "products" and
ii) From "parts" to "trainer" entity
So no requirement to have separate tables for both the relations and hence they can be merged with the "parts" entity.Now we know that if no attribute is mentioned in the relationship also , it compulsorily contains the keys of participating entities.
So in the relationship "maintained by" we contain both "part-id" and "trainer-id" as its attributes so on merging with "parts" entity , the attribute "trainer-id" has to be included in the table that will be formed by "parts" , "maintained by" and "belongs-to".
So the attribute set of the merged RDBMS table will be : {part-id , partname , trainer-id , p-id}
and the keys will be : {part-id , trainer-id , p-id}
Hence B is the correct option.