Answer
The solution is
$$\lim_{x\to2}\frac{x^2-4x+4}{\sin^2(\pi x)}=\frac{1}{\pi^2}.$$
Work Step by Step
We will use L'Hopital's rule to solve this limit. "LR" will stand for "Apply L'Hopital's rule".
$$\lim_{x\to2}\frac{x^2-4x+4}{\sin^2(\pi x)}=\left[\frac{0}{0}\right][\text{LR}]=\lim_{x\to2}\frac{(x^2-4x+4)'}{(\sin^2(\pi x))'}=\lim_{x\to2}\frac{2x-4}{2\sin(\pi x)(\sin(\pi x))'}=\lim_{x\to2}\frac{2x-4}{2\sin(\pi x)\cos(\pi x)(\pi x)'}=\lim_{x\to 2}\frac{2x-4}{2\pi\sin(\pi x)\cos(\pi x)}=\left[\frac{2\cdot2-4}{2\pi\sin(\pi\cdot0)\cos(\pi\cdot2)}\right]=\left[\frac{0}{0}\right][\text{LR}]=\lim_{x\to2}\frac{(2x-4)'}{(2\pi\sin(\pi x)\cos(\pi x))'}=\lim_{x\to2}\frac{2}{2\pi((\sin(\pi x))'\cos (\pi x)+\sin(\pi x)(\cos(\pi x))')}=\lim_{x\to2}\frac{1}{\pi(\cos^2(\pi x)(\pi x)'-\sin^2(\pi x)(\pi x)')}=\lim_{x\to2}\frac{1}{\pi(\pi\cos^2(\pi x)-\pi\sin^2(\pi x))}=\lim_{x\to2}\frac{1}{\pi^2(\cos^2(\pi x)-\sin^2(\pi x))}=\frac{1}{\pi^2(\cos^2(2\pi)-\sin^2(2\pi))}=\frac{1}{\pi^2}.$$