Guys,If he is a qualified doctor, he should have been able to diagnose the illness. ---taken from using English. com
If I were a teacher, I will give all that I have known to my students. ----taken from internet.
I am thoroughly confused about the above sentences. Since in my grammar book, both are second conditionals, I do think they are grammatically wrong. But using English.com says the first sentence is correct, one of my friends said the second one is correct also. Could you please tell why? Thanks.