Just find the coordinates of $p - h$ with respect to the frame whose axes are vectors $\vec{a}, \vec{b}$ and whose origin is $h$
The associated linear system can be written as
$ [ \vec{a} , \vec{b} ] [x_1, y_1]^T = p - h $
Then, it follows that
$ [x_1, y_1]^T = [ \vec{a}, \vec{b} ]^{-1} (p - h) $
Since you're interested in Case $B$, then you want $x_1 \gt 0 , y_1 \gt 0$.
For example, if point $h = [2, 3]^T , \vec{a} = [1, -3]^T , \vec{b} = [2, 6]^T $, and $p$ is given as $ [ 5, 7 ]^T$, then
$ \begin{bmatrix} x_1 \\ y_1 \end{bmatrix} = \begin{bmatrix} 1 && 2 \\ -3 && 6 \end{bmatrix}^{-1} \begin{bmatrix} 3 \\ 4 \end{bmatrix} $
And this solves to
$ \begin{bmatrix} x_1 \\ y_1 \end{bmatrix} = \dfrac{1}{12} \begin{bmatrix} 6 && -2 \\ 3 && 1 \end{bmatrix} \begin{bmatrix} 3 \\ 4 \end{bmatrix} =\dfrac{1}{12} \begin{bmatrix} 10 \\ 13 \end{bmatrix} $
Hence, $x_1 \gt 0 , y_1 \gt 0 $, so this is Case $B$.