The first thing I see is that there is a "3m+1" in each term. Taking that out leaves (3m+1)(2(3m+1)- 7- 15). Now you can combine -7- 15= -22 as e^(i*pi) suggests as well as multipy out 2(3m+1) to get (3m+ 1)(6m+ 2- 22)= (3m+1)(6m- 20). If you really want to you could observe that both 6m and 20 are divisible by 2 so you can factor a little further: 2(3m+1)(3m- 10)