Hey DonnieDarko.

Can you show us what you have tried? (Hint: For the first one think about the parameterization in terms of line segments).

In other words, what is the parameterization of each segment (and then take the inner product for that segment)?