calculate the resistance between points A and B.