Hi, Amanda!
Thank you for stopping by the Apple Support Communities. I understand from your post that you seem to have gotten something called Searchmine on your computer that has affected your search engines in both Safari and Google Chrome. I'm happy to help!
First, try the following steps from the Apple Support article How to block pop-ups in Safari - Apple Support:
If you see pop-ups on your Mac that just won’t go away, you might have inadvertently downloaded and installed adware (advertising-supported software) or other unwanted software. Certain third-party download sites might include programs that you don’t want with the software that you install.
If you think that you might have malware or adware on your Mac, update to the latest version of macOS. If your Mac is already running the latest version, restart it. macOS includes a built-in tool that removes known malware when you restart your Mac.
Check your Applications folder to see if you have any apps that you didn’t expect and uninstall them. If you continue to see advertising or other unwanted programs on your Mac, contact Apple."
If you still have the redirect occurring, try running the third-party software Malwarebytes. It's free, and you can download it here: Malwarebytes for Mac — Mac Antivirus Replacement | Malwarebytes.
The information in Protect your Mac from malware - Apple Support will help you prevent this from happening in the future.
Cheers!