Why doesn't the computer recognize the speakers or headphones?

Your question is a little vague. Most speakers and headphones do not have a data connection to a computer, only electrical. Thus they will not show up in the Device Manager