How to remove lag in minecraft?

Add Media
My friend created a server in hamachi and the game runs perfectly on his computer, but when I log into his server i have really bad lag; it takes 2 minutes to get a response from the game.

The funny thing is when I connect to his server using his Wi-Fi, the game is completely fine. But that means that we can't play from each of our houses.

Same Wi-Fi= good game performance
Different Wi-Fi= bad game perfomance

Is the lag caused by his computer or mine?
What can I do to reduce the lag?

We're playing the 1.7.5 version of minecraft, if that helps in any way

Your Wi-Fi or your computer is bad

Yes, you may just have a bad connection at your house. The only fast solution is to dumb down the graphics from the video settings menu. Turn Graphics to fast instead of fancy, turn off clouds, turn off particles, turn off mipmap levels, turn off anisotropic filtering, turn the max framerate way down to 30 or less, and turn the render distance down too- to about 8 chunks or less. Hope this helps, if not, then just chalk it up to bad connection and play at your friends house. Or maybe YOU could make the hamachi server and see if your friend is able to connect to it without lag!