Answer :

[tex]17+2x=31-5x \\\\ 2x+5x=31-17 \\\\ 7x= 14 \\\\ \boxed{x=\frac{14}{7}=2} [/tex]