In this paper, we are going to compute the average size of 2-Selmer groups of
two families of hyperelliptic curves with marked points over function fields.
The result will be obtained by a geometric method which could be considered as
a generalization of the one that was used previously by Q.P. Ho, V.B. Le Hung,
and B.C. Ngo to obtain the average size of 2-Selmer groups of elliptic curves