1. We use "in terms of" to focus on a certain aspect of something. On the other hand, "when it comes to" is used to refer to a specific matter.
2. "Exanding your horizons" means learning; acquiring "knowledge" is also learning.
A: He can rattle on for hours when it comes to the topic of sports cars.
B: He can rattle on for hours in terms of the topic of sports cars.
C: He can rattle on for hours about sports cars in terms of their specifications and history.
You may notice B sounds odd as someone is focusing on a topic and "when it comes to" should be used. C is correct as there are many aspects of sports cars (e.g. specifications, models, their history, models) and "in terms of" focuses on a specific aspect/on specific aspects.
So, you could modify your sentence, and here are some alternatives:
"John and I are on the same page when it comes to expanding our intellectual horizons."
"John and I are on the same page when it comes to acquiring knowledge."
The position of "in terms of".
D: In terms of service, both hotels are given the top rating.
E: Both hotels are given the top rating in terms of service.
In D, the sentence starts with an emphasis on the service aspect: in sentence E, the sentence starts with an emphasis on something similar between two hotels. Otherwise, the overall meaning is the same.
I hope this helps.