Well, you're looking at an abelian group (say with operation $\oplus$) of order $9,$ correct? Then either the group will be cyclic, or it will be isomorphic to $C_3\times C_3$. Let's rewrite the non-identity elements of the group as: $$(1,4),\ominus(1,4),(2,5),\ominus(2,5),(5,4),\ominus(5,4),(9,1),\ominus(9,1)$$ (these are written in the same order as you had them, but making the inverse elements clear). Since elements have the same order as their inverses, then we need consider only $$(1,4),(2,5),(5,4),(9,1).$$ Either all four of them have order $3$, or three of the four of them have order $9$. In the latter case, we'll have a cyclic group. Regardless, you'll only need to check two of them, and if you're checking $(p,q)$, then you'll only need to check if $(p,q)\oplus(p,q)=\ominus(p,q)$. If not, then $(p,q)$ has order $9$ and we're done.