Solve for a ba+c=d