assuming v2 is initially off and the capacitor is at voltage (V+V1), then the voltage Vab = V2 + (V+V1) = V2 + Vdiode
if we assume V > 0, V1 > 0 and V2 > 0, then Vab = V2 + (V + V1) which is always greater than V1, so the diode never turns on.
at least this is what i'm thinking. seems like the problem has a few different cases of operation depending on the values of these voltages.