Both are great tools but, my vote will go to Ahrefs.
If your main focus is keyword research and you´re on a budget and would like to stay away from SEO Group Buy Tools then, you should consider checking KWFinder.
Ahrefs is THE best ALL-IN-ONE SEO tool on the market today. The learning curve is a bit steeper in comparison with SEMRush but, trust me, it is more than worth it.
Another added value to Ahrefs is that they have some of the best articles (on their blog) and tutorials (on their YouTube Channel) you can leverage to get the max out of the software.
If you´re still undecided it, take a look at these resources...
13 Things That Only Ahrefs Can Do
Ahrefs Review: An In-Depth Look
Here’s How to Use Ahrefs for SEO (According to 97 Marketers)
Ahrefs: The Ultimate Guide
And, at the top of my favorite SEO resources we have...
Ahrefs´ Blog
Ahrefs´ YouTube Channel Playlist
Lastly, I strongly recommend you to try out both software. I believe SEMRush offers a 30-day free trial and, you can get full access to Ahrefs for 7 days for $7.
Give both a try and draw your own conclusions but, regardless of which one you chose, you won´t be making a bad decision (Unless you pick SEMRush)
haha obviously kidding (no I am not

)
Cheers!