Sergeant Guy Bates said he heard the "whoosh" of a Javelin anti-tank missile, seconds before it landed.
Capt Tom Sawyer, 26, of Hertfordshire, and Cpl Danny Winter, 28, from Stockport, were killed in the explosion in central Helmand in January 2009.
Two other soldiers were injured in the blast, which was ordered by the Danish Army, the inquest heard.
The men were among a group of British troops taking part in a joint operation with the Danish against the Taliban, the inquest heard.
Sgt Bates, one of the men injured in the explosion, said the team were providing covering fire from a rooftop when mortars fired by the Danes started landing closer to their position.
"This was when the hairs on the back of my neck started to stick up," he said.
Sgt Bates, who has since left the Army, said that Capt Sawyer was on a radio alerting his superiors to the imminent danger when small arms fire started.
"At that point I was on my knees waving. It was not automatic, it was deliberately single shot and quite accurate," he said.
"I was pretty sure that we were going to get hit by something..."
"There was quite a bit of cursing: 'What do these plonkers think they are doing?'" he said.
"That message seemed to have got through because the small arms fire stopped."
But Sgt Bates said, a couple of minutes of later he heard a "whoosh" sound.
"I saw a light go into the air and I assumed that it was a flare," he said.
"Just after that I remember seeing the impact and just for a split second everything illuminated and I saw it hit Danny and everything went orange.
"I could hear Tom and I was scrabbling around in trying to find him. I applied a dressing to his head. I was also calling for a medic.
"I was expecting something else to come back down on us and I was trying to get everyone off the roof."
Investigations into the incident have shown that the missile was fired by British personnel, but that the order was given by a lieutenant in the Danish Army - referred to only as Soldier A.
The Danish soldiers have declined to attend the inquest and their evidence will be given through witness statements.
Sgt Bates told Wiltshire and Swindon Coroner David Ridley that he had concerns about a previous joint operation with the Danes.
British forces had created a "restricted fire area" to reduce the chances of friendly fire, he said.
Sgt Bates explained to the coroner that there was a "robust procedure" that British troops went through before firing artillery, mortar shells or calling for air support to target an enemy.
Asked whether the British troops were "properly resourced" in January 2009, Sgt Bates replied: "Not ideally.
"I think we were given enough to get on with the job.
"Were we properly resourced? We would always want something extra. The Americans call us 'The Borrowers' and we would make do with what we could get.
"Should we have had more specialist kit and more boys? Yes."
Capt Sawyer was serving with 7 (Sphinx) Commando Battery, 29 Commando Regiment Royal Artillery.
He was in Helmand province deployed on operations as a fire support team commander attached to Zulu Company, 45 Commando Royal Marines.
Cpl Winter was a specialist mortar fire controller and was serving in Helmand province with the mortar troop of Zulu Company, 45 Commando Royal Marines.
A British soldier has described the moment he saw two colleagues killed in "friendly fire" in Afghanistan.