Finding the equation and value