Perimeter (for problem 1), Relative motion (for problem 2)