This is a case where the specific implementation of the ThreeProvider interface/contract is wrong. It has nothing to do with DI and the calling code in the Sample class is correct.
The unit tests for the specific implementation should catch this.
You have to read the code anyway when you are debugging this issue. And by having the implementation behind and interface you can fix the bug once and be sure that it is fixed everywhere it is used.
But that's the thing. Look at the code in the comment I replied to. It calculates 6. You would have to _read_ the code to know why. A DI framework would make this situation even worse.