$$\require{cancel}$$
Any element of mass, $$δM$$ on the surface of a hemisphere of radius $$a$$ is at a distance $$a$$ from the centre of the hemisphere, and therefore the potential due to this element is merely $$−G δM/a$$. Since potential is a scalar quantity, the potential of the entire hemisphere is just $$−GM/a$$.