It would be helpful if you could paste the expressions here rather than using a screenshot (use print() on them to get a string representation). That way we could easily reproduce the issue.
Also, as Jonathan mentioned, this does indeed look like a bug. SymPy should be able to integrate rational functions without any problems. So I would suggest opening an issue for this.
https://github.com/sympy/sympy/issues
Finally, when something hangs like this, it helps to interrupt it after it has been running for a while and to include the traceback, so we can get an idea of where it is getting stuck.
Aaron Meurer