Assume we know the values of xg, yg, a, b, m then the problem is described as follows:
minimize (x - xg)2 + (y - yg)2
s. t |x - a| > m
|x - b| > m
Also suggest state vector. I think X = [x; y] In Which optimization technique like QP, least squares etc., this problem can be described ?? What should be the corresponding matrices ??