
The shaded part is formed by joining two vertices with the midpoints of the opposite sides.

The triangle is formed by joining the adjacent vertices to the midpoint of the opposite side.
source: cuemath.com

The shaded part is formed by joining two vertices with the midpoints of the opposite sides.

The triangle is formed by joining the adjacent vertices to the midpoint of the opposite side.
source: cuemath.com
On
Rearrange parts of the hexagon to make a rectangle.
The area of the purple parallelogram is $bh$. Since the parallelogram and the rectangle have the same height, the proportion of area only depends on the base, so $\frac{1}{3}$.
The area of the green parallelogram is $\frac{1}{2}bh$. Again since the triangle and the rectangle have the same height, the proportion of area is $\frac{1}{2} \cdot \frac{2}{3} = \frac{1}{3}$.
On
The the side-to-side length of hexagon (diameter of incircle of hexagon) is actually one of the diagonals of the parallelogram for the first diagram and the altitude of the triangle for the second diagram. Let's consider the side of hexagon $\mathrm{a}$ and this side-to-side length $\mathrm{d}$. The parameters has the relation $\mathrm{d = a\sqrt{3}}$.
The parallelogram consists of two right triangle where the altitude is $\mathrm{d}$ and the base $\mathrm{\frac{a}{2}}$. So, the area of parallelogram = area of two right triangle.
Area of parallelogram = $\mathrm{2\times \frac{1}{2} \times a\sqrt{3} \times \frac{a}{2} = \frac{a^2 \sqrt{3}}{2}}$
Area of hexagon = $\mathrm{\frac{a^2\times3\sqrt{3}}{2}}$
So, fraction of shaded region = $\mathrm{\frac{area~of ~\parallel ogram}{area~of~hexagon}=\frac{a^2 \sqrt{3}}{2} \times \frac{2}{a^2\times3\sqrt{3}}=\frac{1}{3}}$
For the second diagram, area of triangle = $\mathrm{\frac{a\times a\sqrt{3}}{2}= \frac{a^2 \sqrt{3}}{2}}$.
So, the fraction of shaded region = $\mathrm{\frac{area~of ~triangle}{area~of~hexagon}=\frac{1}{3}}$
For what it's worth, you don't have to calculate anything for the second diagram if you have already calculated for the first diagram. If you flip vertically one of the right triangles from the parallelogram, you'll get the triangle from the second diagram. So, the area remain same and so is the fraction of shaded portion.
Shifting a triangle vertex, or two adjacent vertices of a parallelogram, parallel to the line formed by the remaining two vertices does not change the area. Hence the two given hexagons (top/bottom-left below) have the same shaded area as the top-right figure below, which in turn has the same shaded area as the bottom-right figure by decomposing into half-triangles:
Hence $\frac13$ of the area is shaded in both given cases.