A line with equal intercepts on both axes means the x-intercept and y-intercept are at the same distance from the origin.
When a line makes equal intercepts, it has the form:
x+y=k
where k is a constant.
The line passes through the point (2,5).
Substituting x=2 and y=5:
2+5=k
k=7
The equation of the line is:
x+y=7