Is it safe for my dad to take some of my cold medicine, even though he has a prostate infection?

Maybe not. With a prostate infection, many cold medicines may make it even more difficult for him to urinate. Don't give it to him until his doctor has given his approval. Good thing you asked!
Yes. Over the counter medications are "safe" to take. The risk of these medications include urinary retention from affecting the prostate gland. If there is an active prostate gland infection, defer treatment until the infection clears because of the risk of retaining urine with an infection present. When there is no infection present, these are safe to take but he must be monitored for retention.