This is proposition 30 of book 1 of the elements of Euclid.
If lines l and m are parallel to n
then let p be a line that falls across them then the angle between line p and line l is the same as the angle between line p and line n (the is propostion 29 of the elements: that alternate angles are equal)
Similarly p lies across m and n, so the angle made between p and m, and p and n are equal.
Thus the angle between p and l is equal to the angle between p and m (as the are both equal to the angle between p and n)
Thus these two angles are alternate, and by the converse of proposition 29, lines l and m are parallel
qed.
If lines l and m are parallel to n
then let p be a line that falls across them then the angle between line p and line l is the same as the angle between line p and line n (the is propostion 29 of the elements: that alternate angles are equal)
Similarly p lies across m and n, so the angle made between p and m, and p and n are equal.
Thus the angle between p and l is equal to the angle between p and m (as the are both equal to the angle between p and n)
Thus these two angles are alternate, and by the converse of proposition 29, lines l and m are parallel
qed.