I think you should call or email the airline and not wait on the gate agent. If they say there isn't anything they can do, then ask the gate agent.
You might be tempted to check in your friend who isn't attending, then letting your other friend clear security with his boarding pass, then use your other friends boarding pass to get the seat. You shouldn't do this, as I believe this is illegal. Additionally, your friend would not have a return boarding pass if they didn't arrive on the first flight.
Happy and Safe Travels