Okay, we are given 5798 and 4165. Let's add them up step by step.

Step 1: We'll start by adding the digits 8 & 5 in column 1 and get 13.
We'll write down the last digit 3 and carry the 1 to the next column.

Step 2: We'll start by adding the digits 9 & 6 in column 2 and get 16.
We'll write down the last digit 6 and carry the 1 to the next column.

Step 3: We'll start by adding the digits 7 & 1 in column 3 and get 9.

Step 4: We'll start by adding the digits 5 & 4 in column 4 and get 9.

So, 5798 + 4165 = 9963.

