Ah ha ! A nice problem. You need to read it slowly and carefully
to avoid getting tangled up and falling down.
Originally in the can: 5,026 .
Amount poured from the bag: ' F ' (for 'flour')
New amount in the can: 5,026 + F
New amount in the bag: 4,158 - F
You said there's twice as much in the can as there is in the bag,
so you can write
5,026 + F = 2 (4,158 - F)
Eliminate parentheses on the right side: 5,026 + F = 8,316 - 2F
Add 2F to each side: 5,026 + 3F = 8,316
Subtract 5,026 from each side: 3F = 3,290
Divide each side by 3 : F = 3,290/3
Amount in the can = 5,026 + F = 6,122 and 2/3
Amount in the bag = 4,158 - F = 3,061 and 1/3
Check:
(6,122 and 2/3) / (3,061 and 1/3) = 2 yay!
I don't know why the question-writer picked such weird numbers.
In order to actually go through the process that's described, you'd
need to be able to measure differences of 1/3 gram out of almost
13-1/2 pounds of flour ... a measurement accuracy of 0.005 % !
But my arithmetic is bullet-proof.