Note that:
$$\begin{align}
&\max(S_T^1,S_T^2)=S_T^2+\max(S_T^1-S_T^2,0)
\\
&\min(S_T^1,S_T^2)=S_T^2-\max(S_T^2-S_T^1,0)
\end{align}$$
Terms of the form $\max(S_T^i-S_T^j,0)$ can be evaluated with the Margrabe’s formula in a Black-Scholes framework.
Regarding the change of numéraire, I give a sketch of how one would proceed. Letting $\xi_T$ be the payoff at $T$, we have in all generality, with $B_T$ the money market account:
$$\begin{align}
E^\mathcal{Q}\left(\frac{\xi_T}{B_T}\right)&=E^\mathcal{S}\left(\frac{B_TS_0}{B_0S_T}\frac{\xi_T}{B_T}\right)
\\
&=S_0E^\mathcal{S}\left(\frac{\xi_T}{S_T}\right)
\end{align}$$
where $\mathcal{Q}$ is the risk-neutral measure, with the money market account as numéraire, and $\mathcal{S}$ the measure with the stock price as numéraire (note that $B_0=1$). Here, $\xi_T=\max(S_T^i-S_T^j,0)$ hence if you choose $S^j$ as numéraire you get:
$$E^\mathcal{Q}\left(\frac{\xi_T}{B_T}\right)=S_0^jE^{\mathcal{S}^j}\left(\max\left(\frac{S_T^i}{S_T^j}-1,0\right)\right)$$
The ratio $S^i/S^j$ will be lognormally distributed in a Black-Scholes framework. Keep in mind you need to ensure the ratio is martingale, as any traded asset rebased by a numéraire is a martingale under the measure associated to that numéraire. For that, you have to apply Itô’s Lemma to the ratio and define the Brownian Motion $W^{\mathcal{S}^j}_t=W^\mathcal{Q}_t+\theta_t$ by setting $\theta_t$ such that $S^i/S^j$ has no drift.