We look at the division of 42889035 by 40 
The aim is to understand the frequency of 40 in 42889035.

On to step 1:
If we divide 4 by 40, we get 0 and a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 4 after subtracting 0 from 4.
Fetch the next digit (2) from the dividend, attach it to 4 and continue: 42 / 40

Going ahead to step 2:
If we divide 42 by 40, we get 1 and a remainder of 2.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtracting 40 from 42 leaves us with 2.
Fetch the next digit (8) from the dividend, attach it to 2 and continue: 28 / 40

Let's proceed to step 3:
When dividing 28 by 40, we get 0 with a remainder of 28.
The next digit of our result is 0. 
Result so far: 10.0
Deduct 0 from 28 and we're left with 28.
Fetch the next digit (8) from the dividend, attach it to 28 and continue: 288 / 40

Advancing to step 4:
40 can be fit into 288 7 times, resulting in a remainder of 8.
Record the quotient 7 as the next digit in the result. 
Result so far: 107.0
Subtracting 280 from 288 leaves us with 8.
Take the next digit (9) from the dividend and append it to 8, then repeat: 89 / 40

On to step 5:
40 can be fit into 89 2 times, resulting in a remainder of 9.
Write down 2 as next digit of the result. 
Result so far: 1072.0
Subtract 80 from 89 to get 9.
Fetch the next digit (0) from the dividend, attach it to 9 and continue: 90 / 40

On to step 6:
40 goes into 90 2 times with a remainder of 10.
The number 2 becomes the next digit in our result. 
Result so far: 10722.0
Deduct 80 from 90 and we're left with 10.
Append the next digit (3) from the dividend to 10 and continue with: 103 / 40

Step 7:
103 divided by 40 is 2 with a remainder of 23.
Write down 2 as next digit of the result. 
Result so far: 107222.0
The remainder is 23 after subtracting 80 from 103.
Include the next digit (5) from the dividend after 23, then repeat: 235 / 40

Step 8:
40 can be fit into 235 5 times, resulting in a remainder of 35.
Write down 5 as next digit of the result. 
Result so far: 1072225.0
Subtract 200 from 235 to get 35.
Since there are no more digits in the dividend, we add a zero to the remainder making it 350, and continue the process.

On to step 9:
350 divided by 40 is 8 with a remainder of 30.
Use 8 as the next digit of our solution. 
Result so far: 1072225.8
Subtracting 320 from 350 leaves us with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 10:
40 can be fit into 300 7 times, resulting in a remainder of 20.
Put 7 as the next digit of the answer. 
Result so far: 1072225.87
Deduct 280 from 300 and we're left with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 11:
40 goes into 200 5 times with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 1072225.875
If we take 200 away from 200, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 12:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 1072225.875
Deduct 0 from 0 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 13:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 1072225.875
Subtracting 0 from 0 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final outcome is 1072225.875, with a leftover of 0.0.