Given the x and y intercepts, you may be able to get the slope of the line using the formula of slope known as 
m =  \frac{y_2 - y_1}{x_2 - x_1}
say you have -2 as the x-intercept and 4 as the y-intercept then you'll have the coordinates as: (-2,0) and (0,4) 
substituting the values for x and y then you'll have the slope as
m = 2
taking one of the points to consider and using the slope you'll have it as
(y-y1) = m(x-x1).. let's have (-2,0)
y = 2(x-(-2))
y = 2(x+2)
y = 2x + 4
and voila! you already have the equation of the line
1 5 1