For V1:
Both MOS are diode connected => both are at saturation:
I1=I2
µnCox(w/l)n(V1-Vtn)^2 = µpCox(w/l)p(Vdd-V1-Vtp)^2
Solving this equation: you can get V1.
For V2:
PMOS is diode connected => at saturation.
If Vtp >= Vtn: You should assume that NMOS is at triode.
I1=I2
µnCox(w/l)n(Vdd-Vtn-(V2^2)/2) = µpCox/2(w/l)p(Vdd-V1-Vtp)^2
Solving this equation: you can get V2.
If Vtp<Vtn:
you should check mode of operation of NMOS after previous solution (Vds>Vgs-Vtn)
If not at triode, solve as in saturation.