Problem explained and solved on attached document. Additional examples are given. Enjoy!
Y(2nd)-Y(1ST)
---------------------buy answer if you want the rest! :)
X(2nd)-X(1st)