A prepositional phrase was added to the second sentence, although technically the sentence length was also changed.
A prepositional phrase can function as either an adjective phrase or an adverb phrase to modify other words in a sentence. Common examples of propostions in a sentence include after, at, before, behind, for, from, in, etc... In the sencond sentence, the prepostional phrase is "for the history lesson."
A compound sentence is a sentence that has at least two independent clauses joined by a comma, semicolon, or conjuction. The new sentence does not have two independent clauses.
Inverted word order is when the subject comes after the verb, in between verb parts, or is not included at all.