Finding the sum of two functions