find a so the function be continuous Function

The limit as x approaches 1 from either side should match, so that
[tex]\displaystyle\lim_{x\to1^-}f(x)=\lim_{x\to1}(-2x+a)=a-2[/tex]
[tex]\displaystyle\lim_{x\to1^+}f(x)=\lim_{x\to1}x=1[/tex]
==> a - 2 = 1 ==> a = 3
The answer is a = 3.
Finding Left Hand Limit (LHL)
[tex]\displaystyle \lim_{x \to \11^{-}} f(x) = -2(1) + a[/tex]
Finding Right Hand Limit (RHL)
[tex]\displaystyle \lim_{x \to \11^{+}} f(x) = 1[/tex]
For a continuous function, LHL = RHL