Note: You forgot to add the diagram, so I found the missing diagram and attached below, based on which I am solving your query. Hopefully, it would clear your concepts anyways.
Option B is correct, as  Â
Step-by-step explanation:
From the attached figure,
Δ is a right triangle.
Applying Pythagoras theorem,
switching sides
Note that Δ s also right triangle.
          ∵
    Â
But length of a side can not be negative, so ignore the negative solution.
so
          ∵
Therefore, option B is correct, as  Â