united-states
He'd be looking at ~6+ more years in prison in the second scenario
In the United States, this would be attempted murder in both cases, though in the case of actual physical harm, the prosecutor could charge related offenses such as battery, which is "an intentional offensive or harmful touching of another person that is done without his or her consent."
Note that though most attempted murders would likely be state crimes, I'm going to answer the rest of this from the perspective of a federal prosecution for attempted murder. The result would likely be similar for states, though the exact mechanism would be different.
Sentencing for people convicted of serious federal crimes is guided by the United States Federal Sentencing Guidelines. An "offense level" is determined, then combined with the offender's criminal history and checked against the sentencing table to determine a suggested sentencing range for the judge.
Specifically, for Assault with Intent to Commit Murder; Attempted Murder, §2A2.1. states that:
(a) Base Offense Level:
(1) 33, if the object of the offense would have constituted first degree murder; or
(2) 27, otherwise.
(b) Specific Offense Characteristics
(1) If (A) the victim sustained permanent or life-threatening bodily injury, increase by 4 levels; (B) the victim sustained serious bodily injury, increase by 2 levels; or (C) the degree of injury is between that specified in subdivisions (A) and (B), increase by 3 levels.
(2) If the offense involved the offer or the receipt of anything of pecuniary value for undertaking the murder, increase by 4 levels.
So in this case, it sounds like Joe suffered a life-threatening injury in the scenario where he got shot. Let's assume that this is Bob's first offense, and that it would have constituted first degree murder.
If Bob missed, he'd be looking at 135-168 months (11.25-14 years) in prison. If he shot Joe successfully, he'd be instead looking at 210-262 months (17.5-21.83 years) in prison.