1st sloka meaning is
If a good person is a friend of goog person he will be good if do's friendship with a bad person he becomes bad like that if you mix water with good water it will be goog if you mix it with sea water it will become bad and salty.