This is a question from A Book Of Abstract Algebra. I found this question which gives the same hint the book gives. Here are the hints given by the book:
$ord(a) = ord(bab^{-1})$
if $a = bab^{-1}$, then $ab = ba$ (i.e. $a$ and $b$ commute).
I still don't understand how to solve this. $ord(a) = ord(bab^{-1})$ doesn't mean $a = bab^{-1}$, right?