That is either malware or another sort of hijack. That warning means there is someone intercepting your Internet traffic. Google uses HTTPS by default, which will detect this sort of thing. Yahoo does not.
Unfortunately, walking you through everything that might be wrong is a rather big job. I’d suggest posting to a malware removal forum like bleepingcomputer.com to get you straightened out. Though just trying the tips in the Pinned Anti-malware topic may help, even though it’s rather out of date.
There are posts at the mozillazine.org site (a forum not affiliated with Mozilla) that warn against downloading Firefox from sites other than mozilla.org, since Firefox is open source and others can load all kinds of crap, such as redirects and worse, into the download.