How to solve composite functions aka function of a function