Here the value of the option is calculated using the risk neutrality assumption. Under this assumption, the "expected value" (as opposed to "locked in" value) is discounted. The expected value is calculated using the intrinsic values from the later two nodes: "Option up" and "Option down", with u and d as price multipliers as above. These are then weighted by their respective probabilities: "probability" p of an up move in the underlying, and "probability" (1-p) of a down move. The expected value is then discounted at r, the risk-free rate.