how do I interface with a 4x4 keypad/

The whole thing is none trivial.

Start off by putting your key reading code into a function that returns a number.

This is a bit more difficult than you might think. It has to look at keys pressed and accumulate a number building it up from each key press. So the first number is the key, the second press you take the previous number, multiply it by 10 and add the next key pres to it. You continue to do this until you detect a none number key. You then return from the function with the number.

Then your top level loop consists of calling this function twice, and storing the number in a different variable each time. Finally add the numbers up and print out the result.