10 cm from both ends means symmetrical and distance from center

Now since its symmetric so the component along the wire length will be cancelled so the only component that remains is perpendicular to plane.

Where l is length of wire.
Thanks & Regards
Arun Kumar
IIT Delhi
Askiitians Faculty