Assuming option on each single asset can be priced by Black Scholes, i.e. both S1 and S2 follow GBM. The correlation between vol of S1 and that of S2 is rho. Assuming constant interest rate, no dividend, what would be the formula to price an European option with this payoff C=max(S1-K*S2,0)? K is the strike.
This is a rainbow option with two assets $S_1$ and $S_3=KS_2$. $S_3$ also follows the Black & Scholes stochastic equation with initial value $KS_2(0)$ and the same other parameters as $S_2$.
You can find in section 3 (The Result of Margrabe) of the following article the formula to price these kind of products:
You can re-write the payout as $C = S_2 \, max( S_1 / S_2 - K, 0)$ and then value the option in units of $S_2$ at first. Say $S_2$ is the IBM share price, then we would value in units of IBM shares. In that case it is a simple option with payout $max( S_1 / S_2 - K, 0)$. If the volatilities are $\sigma_1$ and $\sigma_2$ and the correlation is $\rho$, the volatility of $S_1 / S_2$ is $\sigma_3$ where $\sigma_3^2 = \sigma_1^2 + \sigma_2^2 - 2\rho \sigma_1 \sigma_2$. Then the forward value is given by the Black--Scholes formula $FV = BS(F_1/F_2, K, \sigma_3)$ in units of $S_2$, and in USD the present value is $PV = D_f\, F_2\, BS(F_1/F_2, K, \sigma_3)$ where $D_f$ is the USD discount factor, $F_1$ and $F_2$ are the forward levels for $S_1$ and $S_2$.