Latex treats a period followed by space as the end of a sentence. As a result extra space is typeset after 'e.g.' and 'i.e.'. To avoid this force a single space using backslash followed by a space.
trees e.g.\ ash, birch.
A value followed by its unit should not be split across a line. To avoid this define the space between the value and its unit.
4\ cm
A common latex mistake is to include the unit while still in math mode.
9.87\ m\,s$^{-1}$ not $9.87\ m\,s^{-1}$