It is a fragment because it is only part of a sentence. There has to be something after "<span>When he and himself agreed upon anything" to make it a complete sentence. It may not be correct because this is high school stuff and I'm not in high school so it might be wrong. (Just saying)</span>