That is a classical riddle. Obviously something is wrong! It would be difficult to explain but what happens is that there is a thin long parrallelogram in the second diagram (65 squares) whose area is 1 unit (it is covered with thick black line thus it would be inconcievable by the human eye). Thus in the second diagram the number of squares is also 64 not 65!. Also, notice that the slope of the two lines do not match thus, it cannot be a straight line in the second diagram. This puzzle proves something important which many people reject when they first learn math. That just because two things look equal does not mean they are. For example just because it looks like the largest angle we have to prove that it is, just like here.