solved it in the following way, just want make sure I'm not missing something obvious:

Set up a portfolio PF consisting of long S and short P at time t = 0. Choose arbitrary time 0 < t < T. If S_t > P_t then PF_t = S_t - P_t which coincides with the value of the option. If S_t hits P_t from above, then dissolve the portfolio by selling S and buying P. Again both the portfolio PF and the option have the same value 0 in this case.

So we have a self-financing portfolio which has the same payoff at time T as the option. So the option value at t=0 must be the same as the portfolio value in the absence of arbitrage, i.e. option value is S_0 - P_0.