B-Doll:
In the first situation, the fact that it was the pitcher's E would not change whether or not the run was ruled earned or unearned. The issue is, what happened after the E? You say there was a single after the E. Without the E, there would then have been runners at, say, 1st and 2nd. If the next guy hit a double, the run is earned. If the pitcher got K's until the inning was ended, unearned. You have to reconstruct the inning hypothetically as if the E did not occur.
In the other situation, the question may be a scorekeeper's judgment on whether the 2B would have, if he had fielded it cleanly, played it to third. That's kind of an unusual play. Usually a hot smash would be played to the SS covering second, in hopes of turning a DP. So, in reconstructing the inning, you would score the E-4, and pretend that an out was made at 2nd. If that would have been the first out, then the following sac fly would still have scored the guy from third, therefore the run would be earned. If it would've been the second out, then the fly would've been the third out, run couldn't have scored, therefore unearned.
The rules state that if there is doubt as to whether the run would have scored without the E, the pitcher gets the benefit of the doubt, i.e., when in doubt it's unearned.
I always remember that rule when it's MY son on the mound!