I thought that I already did. I did show example programs A and B and then program C that does both operations. Didn't that make the concept clear?
In order to "add second program functions into first program" you have to add the second program functions into the first program. Only you know what those functions are and do, and therefore at this point only you can adapt the functions as necessary, just like I did not merely copy-paste A and B into C.
It's almost certainly possible. However, you've shown us no real code, and told us nothing about what your programs do, nor about how you wish to combine their functionality. How on earth do you expect us to be able to help you?