The behaviour isn't really related to hypphenation, but I think you just want to avoid the final phrase breaking over a line so:

\documentclass[a4paper, 12pt]{book}
\begin{document}
Spellings attempt to transcribe the sounds of the language into
alphabetic letters, but phonetic spellings are exceptions\hspace*{\fill}\mbox{ go to library}
AA Spellings attempt to transcribe the sounds of the language into
alphabetic letters, but phonetic spellings\hspace*{\fill}\mbox{ go to library}
\end{document}
You could make a macro out of this (and address egreg's point) by
\documentclass[a4paper, 12pt,draft]{book} % draft for showing the overfull boxes
%% David's version
\newcommand*{\Dgotoend}[1]{\unskip\hfill\penalty9999\hspace*{\fill}\mbox{ #1}}
\begin{document}
David's version:
Spellings attempt to transcribe the sounds of the language into
alphabetic letters, but phonetic spellings are exceptions \Dgotoend{go to library}
AA Spellings attempt to transcribe the sounds of the language into
alphabetic letters, but phonetic spellings \Dgotoend{go to library}
AA Spellings attempt to transcribe the sounds of the language into
alphabetic letters, but AA phonetic spellings are just bigger exceptions \Dgotoend{go to library}
\end{document}

microtypepackage. In your mwe it works. – ArTourter Dec 29 '13 at 17:42