x1*A+x2*B=X,y1*A+y2*B=Y, solve for A,B