The y intercept occurs when x=0, so the y intercept is -2.5 and y=xf(x)-2.5, where f(x) is a function of x.
The x intercept occurs when y=0 so 0=xf(x)-2.5, and x(f(x)=2.5. The simplest form of f(x) is a constant a, so 5a=2.5 and a=0.5 making y=0.5x-2.5. Another way of doing this is, assuming a linear equation, the slope is -(y-int/x-int)=2.5/5=0.5 and y=0.5x-2.5. To see this geometrically mark off 2.5 on the vertical side of a right-angled triangle and 5 along the horizontal side. The slope is the tangent of the acute angle on the horizontal side. On a graph the y intercept -2.5 lies 2.5 below the origin and the x intercept to the right of the origin. The slope is positive (/ leaning to the right) so the x coefficient in the linear equation is positive.
Note that the linear solution is not the only one possible, it's just the simplest: for example, y=-0.1(x-5)^2 also has intercepts (5,0) and (0,-2.5), as does y=0.02(x^3-125).