I don't see an easy way to eliminate the class equation, but using the Sylow theorems you can classify the groups of order 10 and see whether that class equation matches any of them
By the third Sylow theorem, $G$ has one Sylow 5-subgroup because $n_5 \mid 2$ and $n_5 \equiv 1 \pmod{5}$.
Also by the third Sylow theorem, $G$ can have either 1 or 5 Sylow 2-subgroups; if it has one, then $G$ is cyclic (it is isomorphic to $C_2\times C_5$), so it is abelian and its equation is $10=1+1+\cdots +1$.
The only other option is that it has 5 Sylow 2-subgroups $H_1,H_2, \dots, H_5$. Then by the second Sylow theorem, these subgroups are conjugate of each other.
For $i\neq j$, we have $H_i=gH_jg^{-1}$ for some $g \in G$. Then the nonidentity element $h_i\in H_i$ can be written as $gh_jg^{-1}$, where $h_j$ is the nonidentity element of $H_j$. Thus, $h_j$ and $h_i$ are in the same conjugacy class.
This is true for any pair of distinct indices, so their conjugacy class has 5 elements.
Since there is no 5 in the equation $1+1+2+2+2+2$, it cannot be the equation of our group.