Robert Thomas, a friend who was with them, said they agreed to move to one of the side pens because there were "too many people" in the tunnel.
Nicholas Joynes and Francis McAllister, both 27, were both fatally crushed.
Mr McAllister had swapped his ticket in a seated area for one on the standing terraces.
Ninety-six supporters died at the Liverpool versus Nottingham Forest FA Cup semi-final on 15 April 1989.
Mr Joynes, a draughtsman from Liverpool, married Gillian seven months before the match
Mr McAllister was a firefighter working in London who, his family said, could "charm the birds out of the trees".
His brother-in-law Mr Thomas was among the group that travelled with Mr Joynes.
He said they went into the ground in a group of seven and headed down a tunnel leading to pens three and four behind the goal.
The jury saw CCTV footage of both Mr McAllister and Mr Joynes entering the stadium through exit gate C at 14:55 BST.
Mr Thomas said: "As we got into the tunnel, I was leading... we noticed that it was very busy at the front. There was too many people in there."
Mr Thomas said he managed to get to the side of the tunnel and turn around.
He spoke to the group and they agreed to try to go back and meet in a side pen.
"Everybody agreed that's the route we should take. As we were going out, we were stuck to the wall on the left hand going out, and it was getting really intense coming in," Mr Thomas said.
He said Mr McAllister and Mr Joynes had "no choice but to go forward", adding: "You couldn't just turn around and go against it.
"They just had a crowd either side, which was carrying them along."
The jury heard there is no footage of Mr McAllister in one of the central pens.
He was seen in footage timed at 15:27 lying on his back on the pitch.
David Roe, a former South Yorkshire Police officer, who went into the stadium as the disaster unfolded, saw Mr McAllister with a leather jacket covering his chest and head.
Mr McAllister was "totally motionless" and Mr Roe could not find a pulse, the jury heard
He said he spoke to two people nearby who had an "air of despondency" about Mr McAllister's condition, which suggested signs of life had previously been checked.
Mr Roe then helped carry Mr McAllister to the stadium's gym, where Dr Allan Redgrave confirmed his death.
Mr Joynes was seen inside pen four in images timed at 15:05.
Richard Wood, a police officer who was also on duty, said he first saw Mr Joynes to the right of the goal at the Leppings Lane end of the pitch.
The jury heard this is likely to have happened after 15:36, 30 minutes after police stopped the match.
The officer said he went over to help a group of fans carry Mr Joynes on a makeshift stretcher and his "major concern" was to get him off the pitch and to a first aid point.
Mr Wood said soon after they arrived inside the stadium's gym an off-duty doctor told him to help with resuscitation.
He told the court the unidentified doctor gave mouth-to-mouth, while he gave heart massage.
They gave CPR between five and 10 minutes, Mr Wood said. Another doctor confirmed Mr Joynes had died at 16:05.
Mr Joynes' mother Patricia identified his body in the early hours of the following day.
The inquests in Warrington continue.
BBC News: Profiles of all those who died

5 February 2016 Last updated at 13:30 GMT
Mobile phone footage of the Toffees boss showing off a series of slick moves at the Jason Derulo gig has been shared thousands of times on Twitter.
Martinez later confirmed he was at the event and said he was a "big fan" of the American pop star.
And he said: "I have better moves, believe me. Probably that [seen on the video] was the worst move."
Two fans who died at Hillsborough had wanted to leave a tunnel leading to fenced enclosures but could not because of the crowd, the inquests have heard.
[NEXT_CONCEPT]
Everton manager Roberto Martinez has been spotted dancing the night away at a concert in Manchester.