Gradient of any line is Rise/Run --> The height/the width. Since the question specifies to consider this, your attention should immediately focus on that.
In a triangle, a^2 + b^2 = c^2 where a and b are adjacent sides, and c is the hypotenuse. In this diagram. you have the the hypotenuse L...