The item that was invented last among the ones mentioned is the **lightbulb**. Here's a breakdown of the timeline for each invention:
1. Locomotive - Invented in 1804
2. Telephone - Invented in 1876
3. Typewriter - Invented in 1878
4. Lightbulb - Invented in 1879
Based on the chronological order of inventions provided:
- The locomotive was invented first in 1804.
- The telephone was invented next in 1876.
- The typewriter followed in 1878.
- The lightbulb was the last item to be invented among the options given, in 1879.
Therefore, the correct answer is **B. Lightbulb** as the item that was invented last.