Let's bring scenario one closer to home by changing
Sits down at his workstation, hits Google a searches for something that fits the spec. Finds something close, downloads the source. Opens the source, tidies up the layout. Adjusts a few comments. removes some bits that are redundant, adds a few bits that are missing. Refines a few bits that don't work the way he thinks they should.
to
Sits down at his workstation, searches CPAN for a package that implements the spec. Finds something close, downloads it. Adds wrapper to subclass the package to add a few bits and refine a few others that don't work they way he thinks they should.
Did programmer B do a better job than programer A? In terms of how well tested the result is, probably yes. Programmer A won't have had time to fully debug one day's worth of work, while programmer B is leveraging a tested module, leaving him/herself more time to test the result.
Did you think Programmer B showed initiative but that Child B cheated?
As phrased, yes. But this is a trick question. A school assignment is not the same thing as a professional assignment. People who can't tell the difference make a lot of extra work for themselves.