For side gh, consider the right triangle it is in, which contains a1, which you know. (Label the center of your diagram X.) You know GX - it's half the width, right?
With respect to a1, then, you know the leg adjacent to it (GX) and you want to know the side opposite it (GH). Which trig function relates the adjacent and the opposite? Tangent. Tangent provides a ratio for the opposite to the adjacent lengths of a right triangle.
tan(a1) = GH / GX.
You know tan(a1), you know GX. Plug in and solve for GH.
Your other question follows similarly, so I'll leave it for you.