We look at the division of 398917 by 45 
We're looking to find how many times 45 goes into 398917.

Going ahead to step 1:
When dividing 3 by 45, we get 0 with a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 45

Going ahead to step 2:
45 goes into 39 0 times with a remainder of 39.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 39 after subtracting 0 from 39.
Grab the next digit (8) from the dividend, add it to 39, then carry on: 398 / 45

Step 3:
45 can be fit into 398 8 times, resulting in a remainder of 38.
The next digit of our result is 8. 
Result so far: 8.0
If we subtract 360 from 398, we get 38.
Grab the next digit (9) from the dividend, add it to 38, then carry on: 389 / 45

Going ahead to step 4:
45 goes into 389 8 times with a remainder of 29.
The number 8 becomes the next digit in our result. 
Result so far: 88.0
Deduct 360 from 389 and we're left with 29.
Append the next digit (1) from the dividend to 29 and continue with: 291 / 45

Moving on to step 5:
The number 45 fits into 291 6 times, leaving a remainder of 21.
The number 6 becomes the next digit in our result. 
Result so far: 886.0
If we subtract 270 from 291, we get 21.
Fetch the next digit (7) from the dividend, attach it to 21 and continue: 217 / 45

Moving on to step 6:
If we divide 217 by 45, we get 4 and a remainder of 37.
The next digit of our result is 4. 
Result so far: 8864.0
Subtract 180 from 217 to get 37.
Since there are no more digits in the dividend, we add a zero to the remainder making it 370, and continue the process.

Step 7:
370 divided by 45 is 8 with a remainder of 10.
Put 8 as the next digit of the answer. 
Result so far: 8864.8
Deduct 360 from 370 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Advancing to step 8:
45 goes into 100 2 times with a remainder of 10.
Put 2 as the next digit of the answer. 
Result so far: 8864.82
The remainder is 10 after subtracting 90 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Step 9:
45 can be fit into 100 2 times, resulting in a remainder of 10.
Write down 2 as next digit of the result. 
Result so far: 8864.822
Deduct 90 from 100 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

After the division, we end up with 8864.822 and a remainder of 0.001.