[終「お」]わる => To finish A; A ends N4
Secondary Verb
[要「よう」]するに => A. In short/put simply, B N2
Adjectival, Descriptions
[必要「ひつよう」]はない => It is not necessary for A to be done N2
Needs, Requirements