What is the equation of a line that passes through the point (5, -2) and has an undefined slope?

A line has an undefined slope if and only if it is a vertical line;

Therefore, we know that this line is a vertical line that passes through (5, -2).

The only line that does this is the line x=5.