The Pythagorean theorem is used to find the distance between two points. If that distance is "c", it satisfies the relation
... a² + b² = c²
where "a" and "b" are the horizontal and vertical differences between the point coordinates. Here,
... a = 7 - 3 = 4 . . . . horizontal difference
... b = 12 - 9 = 3 . . . . vertical difference
Then we have
... 4² + 3² = c² = 25
... c = √25 = 5
The length of AB is 5 units.