First Derivatives interview question

Work out linear interpolation