Equation of a line can be written by y = mx + c where m is slope and c is intercept on y axis.
Now in the question we are given the slope and x intercept ( I am assuming we know whether the intercept is positive or negative). The y coordinate will be zero for the point where the line cuts x axis.
Just for example it is given the slope of line is 4 and x intercept is +1.
Now using this information and the basic line equation we have,
0 = 4*1+c
c = -4
Therefore equation of line will be y= 4x-4
So we can find out the equation of the line if we know the slope and the x intercept along with its sign(positive or negative). If we don't know the sign of x intercept, there will be 2 possible solutions to the problem.