If given two points A(3, 12) and B(5, 22) on a x-y plane. Find the…