The general equation of a line is y=mx+c 
M is the gradient and c is the y intercept 
You are given the gradient in the question so y=3x+c 
To work out the value of c, you substitute the values of the point into the equation : 3=3(-1)+c 
Then solve this 
3=-3+c 
6=c 
So the equation is y=3x+6