If three points a (2,2) B (a, 0) C (0,4) are collinear, then the value of a is equal to

If three points a (2,2) B (a, 0) C (0,4) are collinear, then the value of a is equal to

Let y = KX + B be the functional relation of the lines passing through them
b=4
2k+b=2
The solution
k=-1
b=4
So y = - x + 4
When y = 0, we have
-1*a+4=0
a=4