master theorem is applicable to following type only.
T(n)= a T($\frac{n}{b}$) + $n^k log^pn$
here both are not of form . so can't apply as a and b should be constant. in the second case a is not constant it is a function of n. solve by reccurence relation. or by back substitution.