Let $G$ be a finite matrix group in $GL_2(Q)$ (general linear group of $2$ by $2$ matrices with rational entries) such that every matrix $A\in G$ has integer entries. Prove that $A^{12} = I$ for every $A \in G$.
Attempt :
We have that $A^k = I$ for some natural $k$ since $G$ is finite. Then the minimal polynomial of $A$ divides $x^{k} - 1$. Also, the characteristic polynomial is of the form $x^2 + ax + b$ for some $a,b$. Thus, the minimal polynomial has either a root of the form $x-c$ where $c$ is an integer, or it is the characteristic polynomial itself. In the first case, we get $A = I$ or $A =-I$ since $1,-1$ are the only integer roots of unity. Hence $A^2 = I$.
In the second case, we have that either the roots of the characteristic polynomial are $1,-1$ in which case we get $x^2 - 1$, so $A^2 = I$ again. Otherwise, we have a complex root of unity and it's conjugate. This gives us $b = 1$ as it is the product of these roots, and $a$ is $2 *$ the real part. Hence we get $A^2 + aA + I = 0 $ so $A(A + aI) = -I$. How do I use this to show $A^{12} = I$?
We also know that $a$ is an integer. Suppose that the root of unity $\omega$ is a root of $x^2 + ax + b$. Then we know that $2 \operatorname{Re}(\omega) = a$. But we have that $-1 \leq \operatorname{Re}(\omega) \leq 1$, and so we have that $-2 \leq a \leq 2$.
We know just consider all of the possible cases.
If $a = \pm 2$, then we have that $\omega = \pm 1$, which you have already dealt with.
If $a = 0$, then we have that $\omega = i$, which is a fourth root of unity. Note that we do not have that the minimal polynomial divides $x^6 - 1$, but it does divide $x^{12} - 1$.
If $a = -1$, then the characteristic polynomial is $x^2 - x + 1$, and $\omega$ is a sixth root of unity. (We have that $x^2 - x + 1 \mid x^3 + 1 \mid x^6 - 1$.)
If $a = 1$, then the characteristic polynomial is $x^2 + x + 1$, and $\omega$ is a third root of unity.
Notice above that if the minimal polynomial is $x^2 + 1$, then we do not have that $A^6 = 1$. This can in fact occur. Consider for example the matrix $$ \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} $$
Thus the problem as it currently stands is not true, but your original version before you edited it was correct. The exponent does need to be $12$.