Hi Livi 2412,
I apologize, I'm a bit unclear on the exact issue you are describing. If the default search engine in Safari on your MacBook Pro has been changed from Google to Yahoo, you may find this portion of the following article helpful:
Safari can also send the text you're looking for to a selected search engine for additional suggestions. To select which search engine to use, click the search icon to the left of the text field. Safari includes built-in support for Google, Yahoo and Bing. If you don't want your text sent to a search engine, you can use Private Browsingmode, or disable this feature from the Privacy pane of Safari preferences.
Mac Basics: Browse the web with Safari
http://support.apple.com/kb/HT6074
This setting can also be changed in the menu Safari > Settings > General tab, as detailed here:
Safari 7 (Mavericks): Search the web
http://support.apple.com/kb/PH17150
Regards,
- Brenden