it is easy use the formula of triangle which is 1/2(base × height) and base is the side where the height touches and height means the perpendicular line.
And in some cases there may be the use of pythagoras theorem
Notice target point has y=0, so all terms with y are zero. Then all 6 equations reduce to m x = k, for various m and k. So calculate 4×m and compare to k six times.