Can someone pls explain this one for me, I’m having hard time figuring out the logic.

Consider a stock that will have a value of either 22 or 14 one year from now. If the risk-free rate is 5%, what is
the ratio of shares to short call options with an exercise price of 18 for a portfolio that will have the same value at expiration
regardless of the stock price at the end of the year?
A. 0.50.
B. 0.48.
C. 0.53. Explanation
A is correct. With a stock price of 22 at expiration, the short call payoff is –4.
With a stock price of 14 at expiration, the call payoff is zero.
The appropriate hedge ratio is (4 – 0) / (22 – 14) = 0.5.
Portfolio value: 0.5(22) – 4 = 0.5(14) = 7
A portfolio of 0.5 shares of stock to 1 short call option will produce the same portfolio value whether the stock price at expiration is 22 or 14.

We are calculating the hedge ratio.
Put yourself in the mind of a swap dealer. You have just written a call (short call) and want to hedge (remove) the risk. Payou of short call +ve if stock goes down (premium received) negative if stock goes up.
You can hedge this risk by going long a certaiin number of shares = h
H = (call value fi share goes up - call value if share goes down) / (share price if up - share value_
If share at 22 call (x=18) value = 4,
If shate at 14 call (x=18) value = 0
hedge ratio = h = (4-0)/(22-14) = 0.5

If we write 1 call we must go long 0.5 shares.
To make maths easier think write 100 calls buy 50 shares

If share price goes to 22
Value of share - loss on call = 22 x 50 - 4x100 = 700
If share price goes 14
Value of share - loss on call = 14 x 50 - 0 x 100 = 700

It is the same value no matter what happens. We could aslo show the if the call is priced correctly the return on the trade would be the risk free rate.