I'm self-studying and I'm considering the below example. The specific example is not especially relevant, but I included it for reference.
I'm trying to understand the relationship between a replicating portfolio and the Black-Scholes equation.
It is my understanding that a replicating portfolio for a put involves short selling stock and lending money. There would be a positive cash flow of $Se^{-\delta T} N(-d_1)$ and a negative cashflow of $Ke^{-rT} N(-d_2).$
However, the Black-Scholes formula for a put is: $P = Ke^{-rT}N(-d_2) - Se^{-\delta T} N(-d_1)$.
This formula suggests that a long position in a put is a positive cashflow of $Ke^{-rT} N(-d_2)$ and a negative cashflow of $Se^{-\delta T} N(-d_1)$.
So wouldn't the replicating portfolio create a short position put, while the Black Scholes formula provides a long position put (since the signs are swapped comparing the replicating portfolio to the Black Scholes formula for a put)?
Should examples like the one below clarify what position the put is in?
Basically I'm looking for clarification on the signs of the terms in the formula.