1. There are numerous ways to approach subtraction problems. One of them is to "rewrite" the minuend as required to accomplish the subtraction. If you do that, the logic might look like ...
In the units place, 9 > 2, so we must rewrite 5002 to put 10 more units in the units place. To do that, we need to "borrow" a ten from the tens place. However, there are none to borrow, so we must borrow a hundred from the hundreds place to rewrite the number of tens.
However, there are none to borrow, so we must borrow a thousand from the thousands place. Now, we have a minuend that looks like ...
... (4 thousands) + (10 hundreds) + (0 tens) + (2 units)
Borrowing again, we have ...
... (4 thousands) + (9 hundreds) + (10 tens) + (2 units)
Borrwoing again, we have ...
... (4 thousands) + (9 hundreds) + (9 tens) + (12 units)
Now, we can do the subtraction without further messing around. The result is ...
... (4 thousands) + (9 -3 hundreds) +(9 -6 tens) +(12 -9 units)
... = 4633
_____
Another way to approach the problem is by addition:
Adding 1 to both minuend and subtrahend, we make the problem be
... 5003 -370
Adding 30 to both minuend and subtrahend, we make the problem be
... 5033 -400
Adding 600 to both minuend and subtrahend, we make the problem be
... 5633 -1000
Now we can subtract without difficulty to get
... 5633 -1000 = 4633
2. All of the subtrahend digits are less than the corresponding minuend digits, so subtraction can proceed without rewriting of any kind. The result is ...
... (5 thousands) +(6 -2 hundreds) +(6 -0 tens) +(8 -4 units)
... = 5464
_____
Difference Between the Solutions
Solving the first problem is different because "rewriting" of some kind is required due to subtrahend digits being greater than minuend digits. Subtraction affects digits other than the ones having the particular place value multiplier of interest.