Calculating the constant of variation and writing the equation