# Clarification on the payoff of a portfolio consisting of a long Up&In Put and short Up&In Call

I am trying to make sense of this example:

I'm not following the second line in red: "If you buy an up-and-in put and sell an up-and-in call, the payoff is the strike price minus the stock price whenever the barrier is hit."

How can the author conclude this immediately?

I arrived at the same answer as the author, using different reasoning:

Let $A$ be the event $\{S(t) = 90 \text{ for some } t \in [0, 0.5]\}.$ Then the payoff of the portfolio is:

\begin{align*}\text{Payoff(Portfolio)} &= \text{Payoff}(P_{up, in} - C_{up, in} \big| A)*\text{Pr}(A) + \text{Payoff}(P_{up, in} - C_{up, in} \big| A^c)*\text{Pr}(A^c)\\ &= [\max(K - S, 0) - \max(S - K, 0)]*0.6 + 0*0.6.\end{align*}

Noting that $\max(K - S, 0) - \max(S - K, 0)$ is the payoff of a European Put less a European Call, by the Call-Put Parity, the price of this portfolio must be

$$P_{up, in} - C_{up, in} = 0.6[F_{0, 0.5}^P(K) - F_{0, 0.5}^P(S)] = 0.6*[75e^{-0.10*0.5} - (80 - 2.5e^{-0.10*0.2})] = 0.6(-6.2073),$$ and so

$$P_{up, in} = 4.18 + 0.6(-6.2073) = 0.4556,$$

as desired.

So my question is, how the author skip all of the intermediate steps and conclude what's in red, i.e., $\text{Payoff(Portfolio)} = 75 - S(0.5)$?

Assume you are long an up-and-in put and short and up-and-in call of the same maturity, strike and barrier. When $S_t = B$ for $t \in [0, T]$, then both barrier options knock-in and turn into vanilla options. You are now long a put and short a call with the same maturity and strike. From put/call parity, you know that
$$S_t + C_t = K e^{-r (T - t)} + P_t$$
$$P_t - C_t = K e^{-r (T - t)} - S_t$$