IN THE END/ BEGINNING AND AT THE END/ BEGINNING
The expression “in the end” refers to the final results of some action and is translated as “finally”:
He didn’t want to come at first, but we talked a lot, and in the end, he agreed.
“At the end” has a literal meaning and refers to the last action or last place:
The answers can be found at the end of the chapter.
Analogously looks the difference between expressions “in the beginning (initial stage)” and “at the beginning (literally).”
ON TIME AND IN TIME
“On time” refers to punctuality:
The train departed on time, so we caught our plane without problems.
“In time” means “not late” so then not later than scheduled part of a day or maybe even sooner:
We arrived at the station in time to buy some snacks and magazines.
ON THE WAY AND IN THE WAY
“On the way” refers to a stretch of road between two points and is translated as “about to arrive”:
I bought milk on the way to work.
“In the way” refers to some obstacle blocking the door:
We couldn’t drive any further because there was a fallen tree in the way.
AFTER AND AFTERWARDS
“After” is a preposition always appearing with other words – it may be a noun, gerund form or pronoun.
Don’t go swimming after dinner/eating.
Don’t have dinner and go swimming after it.
“Afterwards” is an adverb not requiring any other words.
Don’t have dinner and go swimming afterwards.