Orientational phase transition between hexagonal solids in planar systems of hard cyclic pentamers and heptamers