Inverting price functions and their conditions/intervals
Notice that if you plug in $P=15$ into either of the $Q(P)$, you get

$$Q(P) = 700-40P = 700 - 40 \cdot 15 = 100$$

$$Q(P) = 400-20P = 400 - 20 \cdot 15 = 100$$

So you can take the exercise further and see that when $P &lt; 15$, then $Q &gt; 100$ (notice the direction of the inequality is changing; the more expensive a good, the less consumers buy of it)