The (S_3, A_n)- and (S_3, S_n)-amalgams of characteristic 2 and critical distance 3