then find the value of k and the distance AB.