We're dividing 9787957 by 509 
Let's see how many times 509 fits into 9787957.

Advancing to step 1:
If we divide 9 by 509, we get 0 and a remainder of 9.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 9 after subtracting 0 from 9.
Bring next digit (7) of the dividend behind the 9 and repeat the process: 97 / 509

Let's proceed to step 2:
When dividing 97 by 509, we get 0 with a remainder of 97.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 97, we end up with 97.
Append the next digit (8) from the dividend to 97 and continue with: 978 / 509

On to step 3:
509 can be fit into 978 1 times, resulting in a remainder of 469.
Write down 1 as next digit of the result. 
Result so far: 1.0
Deduct 509 from 978 and we're left with 469.
Include the next digit (7) from the dividend after 469, then repeat: 4697 / 509

On to step 4:
509 can be fit into 4697 9 times, resulting in a remainder of 116.
The next digit of our result is 9. 
Result so far: 19.0
Deduct 4581 from 4697 and we're left with 116.
Append the next digit (9) from the dividend to 116 and continue with: 1169 / 509

Step 5:
If we divide 1169 by 509, we get 2 and a remainder of 151.
Put 2 as the next digit of the answer. 
Result so far: 192.0
If we take 1018 away from 1169, we end up with 151.
Grab the next digit (5) from the dividend, add it to 151, then carry on: 1515 / 509

Going ahead to step 6:
The number 509 fits into 1515 2 times, leaving a remainder of 497.
Record the quotient 2 as the next digit in the result. 
Result so far: 1922.0
The remainder is 497 after subtracting 1018 from 1515.
Bring next digit (7) of the dividend behind the 497 and repeat the process: 4977 / 509

Step 7:
509 can be fit into 4977 9 times, resulting in a remainder of 396.
The next digit of our result is 9. 
Result so far: 19229.0
If we subtract 4581 from 4977, we get 396.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3960, and continue the process.

Step 8:
If we divide 3960 by 509, we get 7 and a remainder of 397.
Use 7 as the next digit of our solution. 
Result so far: 19229.7
Subtract 3563 from 3960 to get 397.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3970, and continue the process.

Going ahead to step 9:
When dividing 3970 by 509, we get 7 with a remainder of 407.
Record the quotient 7 as the next digit in the result. 
Result so far: 19229.77
Subtract 3563 from 3970 to get 407.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4070, and continue the process.

The final result is 19229.77 with a remainder of 0.407.