BlackRock interview question

Derive the linear regression formula for slope