I know you are a quick and smart learner, that is why I leave more space for you to work out by yourself.
But I will always be available when you DO need help!
Your equation only work if two side are parallel. It is O.K. for integration. :D
For more general polygon: try to think about the meaning of cross product. [b]A[/b] X [b]B[/b]