distance and a+b2