Obito was fodder level when he got to Madara. Madara taught him genjutsu (which obits had not been shown to know how to use) and even how to control the nine tails and probably taught him all the jutsu and tai jutsu skills that obits had in his arsenal. So in a matter of years Madara had obito from way weaker to kakashi to almost destroying the entire leaf village which I believe in itself is a feat in showing how good of a teacher he could have been had he stayed in the leaf