$g(x)=2x-1$

derivative of $g$ at any value $x=a$ in the domain of $g$

$\displaystyle g’(a) = \lim_{x \to a} \dfrac{g(x)-g(a)}{x-a}$

$\displaystyle g’(a) = \lim_{x \to a} \dfrac{2x-1 - (2a-1)}{x-a}$

$\displaystyle g’(a) = \lim_{x \to a} \dfrac{2x-2a}{x-a}$

$\displaystyle g’(a) = \lim_{x \to a} \dfrac{2(x-a)}{x-a}$

$\displaystyle g’(a) = \lim_{x \to a} \dfrac{2( \cancel {x-a})}{\cancel {x-a}} = 2$