As someone new to the work world, you need to be aware that there are several things that are taken into consideration when responding to a request of this nature.
The first is capability. Can this group of people even perform this task. You took this into account and answered. Unfortunately it was the wrong answer because you failed to consider the other two things.
The second thing is priorities. How does it fit with the other work we are tasked to do. If you did not know the answer to this, you should have passed this on to the team lead and told the guy that you were not sure if the team would be able to take it on.
The final considerations is organizational politics. Perhaps he doesn't want to do it because it will make the team that should be doing it mad and he needs them on his side for other projects. Again if you do not know the political situation, you should have pushed the answer off until the team lead returned.
I bring up these things, so you know what to do in the future and what besides capability needs to be considered before you can say that the team can do something. Remember it is not your job to accept work projects but your boss's job. So don't feel bad in referring things to him (or his boss when he is out); you generally have to be fairly senior before having the authority to accept requests.
Should he have told the guys the bad news himself? Possibly, but most likely he wanted you to feel the pain so you don't do this again.
What to say to the other person. Let him know that your team lead returned and he feels the task should be handled by the other team. If he has further questions, refer him to the team lead. Make sure to apologize for promising what you could not deliver.
It is often helpful to say that you were not aware of the whole situation and made a mistake in committing to the task. Admitting a mistake on your part looks better to everyone involved than blaming your boss. Some people hate to admit they made mistakes, but mistakes are expected (especially from junior people) and so no one will think less of you for admitting you went beyond your authority by accepting the task.
If he pushes back instead of accepting that you have to do what your boss asked of you, again refer him to the team lead. Don't let him intimidate you into backing down, your lead is your boss and that is who you have to please not this guy.
And then in the future, do not let anyone push you into committing to a task you are not authorized to accept. This is especially the case with something like this where the requester might have known the team lead wouldn't take on the work and he tried to get you to take it on while the guy was away from his desk. People do things like this in the office world and naive people get caught in them.
You also need to have a long talk with you lead about priorities and tasks that can be accepted and those that can't be accepted when the lead is not present You need to know who to refer such things to if you don't have the authority to make such commitments. You need to understand what things, if anything, you can commit to in the lead's absence.
It is especially important not to commit to anything if the lead will be available shortly. If he was just at a meeting or lunch or in the rest room, you should have told the guy when he would be back. If he was gone for the day or a vacation, you should have known who to send the issue to for resolution. Make sure now, you know what to do if similar circumstances come up again.
It's good to want to be helpful and to be able to meet requests. But you need to understand the underlying reasons why something is or is not a good idea to take on. As you get more senior, you will find that by considering all three things, you will soon be trusted to make commitments.
It helps to start to learn what drives priorities in your organization. For instance, where I work, the highest priority is anything that is making our production applications unusable by a group of people, then anything making production unusable by one person, then anything with legal or regulatory considerations, then anything that a client wants immediately even if we don't think it is all that critical (especially if a client is unhappy for any reason about anything unrelated). When multiple clients are involved, the priorities shift to include how important an individual client is to the business. This is one reason why you need to start to pay attention to such things if you aspire to be the lead of a group of people. So when there are multiple tasks, ask why one is prioritized over another if you don't know.