Memory effects on bidirectional teleportation