How to write this QP in CVX form

With the conditions stated, this is not necessarily convex, even in the scalar case. For instance, A = 1, B = -1.

In the matrix case, it’s not obvious to me that B (and A) being psd would be sufficient to guarantee convexity; so you’d have to prove it was sufficient.