You could try:
\begin{samepage}
This is the first paragraph. This is the first paragraph.
This is the first paragraph. This is the first paragraph.
\nopagebreak
This the second. This the second. This the second.
This the second. This the second. This the second.
This the second. This the second.
\end{samepage}
samepage
prevents LaTeX from pagebreaking within one paragraph, i.e. within the samepage
environment, pagebreaks are only between paragraphs. Thus, you need nopagebreak
as well, to prevent LaTeX from pagebreaking between two paragraphs.