Finding the equation of a linear function