I think I can make an educated guess about class width, but anyone else feel free to correct me.

There is no difference you need to worry about. #1 is the actual definition of class width (subtract the lower limit of one class from the lower limit of the next class). As with most (mathematical) definitions, it is very abstract. To me, it seems to be trying to even apply to cases where the classes are not "joined continuously" (I need to make my own terminology up, because I don't remember specifically learning about class width).

For example, you may be looking at frequency distribution of football players in a school (let's say school has all 12 grades). The classes may be (1st and 2nd grade), (3rd and 4th grade), (5th and 6th grade), ..., (11th and 12th grade). So the classes are not "joined continuously", because the limit for the first class (2nd grade) does not coincide with the limit for the second class (3rd grade). By definition, class width = 3 - 1 for the first class (or 4 - 2 if you subtract the upper limits).It is not class width = 2 - 1, i.e. the difference in the endpoints of the class.

In #2, it is an example. It is NOT another definition. In this example, the classes are joined continuously (like they often are). So actually you could subtract the endpoints of the class to get the class width (since the upper limit of one class "joins continuously"/coincides with the lower limit of the next class).

Since the range of the data was 34 (= 134 - 100), they arbitrarily chose to have 7 classes. Because 34 doesn't divide neatly (only into 1, 2, 17, or 34 classes), they picked a number that was close to dividing neatly. It's purely aesthetic.

In this example, with classes that are "joined continuously", they chose (for aesthetic reasons) to make each class have the same width, and they chose 7 classes. Since the range of the data is 34, then to make each class have the same width, you need width = 34/7. Thinking the other way, with 7 classes of equal width 34/7, they will cover a range = 7 * (34/7) = 34.