We can't advise on whether it's legal or "safe" for you to use a specific image you found on the internet (or elsewhere). If you want to use a photo (or any other content) that you didn't create you may wish to review "fair use" laws for your part of the world.
Also note that through Creative Commons licenses some photographers will make their content freely available for use by others. There may be restrictions involved so be sure to read any fine print.
Remember, the content of your book is entirely up to you, the author. You may also want to review the copyright section of our Terms and Conditions (Section 12).