The children, 14 and 16, had been reported missing by their respective care homes and were feared to be at risk of sexual exploitation.
The 14-year-old was known to have had contact with someone known as 'Black Max' who prosecutors allege is Amos O’Cheng, 51.
O'Cheng, of Winckley Square, Preston, and his co-defendant Dickson Ngaunde, 37, of Stanford Avenue, Brighton, Sussex, are standing trial at Preston Crown Court over alleged sexual exploitation crimes and the sexual abuse of women and girls in Preston.
O’Cheng denies three counts of raping a child, two of raping a woman, three of facilitating travel with a view to exploitation, false imprisonment, and four drugs charges, while Ngaunde is accused of raping a woman, false imprisonment and facilitating travel with a view to exploitation.
Preston Crown Court heard statements and evidence from care staff and police officers about an incident involving the girls on November 6, 2018.
Both had been residents in a children's home on the outskirts of Preston, but one had recently moved to Greater Manchester.
A night practitioner at the Preston home described how he found the 14-year-old polite and pleasant, but on the day in question she was shouting. She wanted to go out and was abusive before leaving the premises and being reported as missing.
She then made a phone call to tell staff not to worry and that she was not returning home, and staff believed it sounded like both girls were in a car.
Later she contacted staff at her home and asked to be picked up.
Lancashire PC Natalie Iddon, who responded to the report about the 14-year-old, described the girl as " visibly intoxicated and being sick" when she picked her up at a garage near Garstang to return her home.
The night practitioner said: " She was on the phone talking and went into the bathroom before screaming for help.
"She said her heart felt weird and she was having chest pain and needed help."
The girl was taken to Blackpool Victoria Hospital to be checked over.
The court heard on the same evening, the 16-year-old had fled her care home in her dressing gown and sliders, and was also spotted getting into a car.
She later contacted staff to say she was in Blackpool and arrangements were made for Lancashire Police to pick her up and meet sexual exploitation officers from GMP at Bolton to transfer her home.
GMP detective Andrew Barratt was given information by the Preston home that the other girl had also been missing, located and taken to hospital, and staff passed on "anecdotal information the 14-year-old had engaged in sexual activity with a man called Black Max, and that the 16-year-old had been with them".
Staff had seen one girl get into a grey Vauxhall car registered to a hire firm, which confirmed O'Cheng had rented it using an e-mail address containing the word 'Max'.
DC Barratt added: "Those two things combined led me to believe Amos O'Cheng could be Black Max."
"There were obvious worries that if the other girl had had a lot of drugs I was concerned she may perhaps need to go to hospital too."
The 16-year-old disclosed she had been with the other teenager and 'Black Max', and had been given cocaine, but said it stung her nose and reacted "differently to normal".
The officer said within a minute of arriving home the older teenager got a phone call and he could " hear someone screaming and shouting" on the phone.
He added: " Her persona changed immediately and went from bubbly and happy to just fear and panic."
The 16-year-old told him the other girl had been informed 'Max' had HIV, then disclosed both teens had had unprotected sex with him, believing he was 29-30.
The Lancashire Post is more reliant than ever on you taking out a digital subscription to support our journalism. For unlimited access to Lancashire news and information online, you can subscribe here.