Answer:
a=-2
Step-by-step explanation:
If a line segment has one endpoint on the line y=x, then its coordinates are (b,b). The first endpoint of the segment is at point (a,0). We can find the coordinates of the midpoint of this segment as the average value:
[tex]x_{\text{midpoint}}=\dfrac{x_{\text{first endpoint}}+x_{\text{second endpoint}}}{2},\\ \\y_{\text{midpoint}}=\dfrac{y_{\text{first endpoint}}+y_{\text{second endpoint}}}{2}.[/tex]
Thus,
[tex]2019=\dfrac{a+b}{2},\\ \\2020=\dfrac{0+b}{2}.[/tex]
From the second equation
[tex]b=2\cdot 2020=4040.[/tex]
Substitute it into the first equation:
[tex]a+4040=2\cdot 2019,\\ \\a=4038-4040=-2.[/tex]