Sylvia Hanika withstood a third-set rally by defending champion Chris Evert Lloyd to score a 3-6, 6-3, 6-4 victory yesterday in the second round of the $250,000 McDonald's Women's Indoor Tennis Tournament in Sydney, Australia. It was the first time Hanika has beaten Evert.

In other matches, Pam Shriver, who was upset by Leslie Allen Thursday, beat Wimbledon runner-up Andrea Jaeger, 6-2, 6-2. Allen defeated Sue Barker, 6-4, 4-6, 6-4, and Australia's only competitor in the tournament, Wendy Turnbull, breezed past Lisa Bonder, 6-2, 6-0.

Allen's win eliminated Barker from finals contention. Allen and Turnbull are the only players to have won both opening ma.

Hanika, 23, a left-hander, played a dazzling match, using a variety of power and spin shots.

"I was vee way I played, and in the end I would have been happy even if I had lost," said a jubilant Hanika.

"There'etween coming close to beating Chris and actually beating her," she said. "Mentally, she is very, very tough ahard to get the deciding edge" . . .

In South Orange, N.J., Andrea Temesvari spoiled the professional circuwith a 6-2, 6-2 victory in the quarterfinals of the $125,000 Mutual Benefit Life Open tournament. Na, the top she defected in June 1982, appeared nervous and double-faulted on the first point of the match against Temesvtalian Open champion and No. 11 player in the world.

"I'm satisfied. My opponent is established, a very strt in with the attitude of learning," Na, 20, said through her coach and interpreter, Bob Huang. Na has not decided whether to accept $1,000 for competing in the tournament or to retain her atus, tournament officials said.