Average of flipped square wave
simulate this circuit &ndash; Schematic created using CircuitLab

Figure 1. The waveform.

$$ V_{avg} = \frac {15x -9y}{x+y} = 2 \ \text V $$

Since \$ x + y = 1 \$

$$ \frac {15x -9(1-x)}{1} = 2 \ \text V $$
$$ 24x = 11 $$
$$ x = 11/24 $$

So the duty cycle is a little below 50%.


  I call it flipped but what I mean is that the on and off time is flipped not the voltages.


Then set \$x = \frac {13}{24}\$ and \$y = \frac {11}{24}\$ and calculate the average using the first equation.