You can use Date Literals in SOQL Queries. Assuming you meant 3 months, i.e. 90 days
select id, Name, Owner.Name from CollaborationGroup where LastFeedModifiedDate < LAST_N_DAYS:90
If you wanted to filter on Owners too, add that to the where clause (ownerIds is a collection of UserIds you want to filter on)
select id, Name, Owner.Name from CollaborationGroup where LastFeedModifiedDate < LAST_N_DAYS:90 AND OwnerId IN :ownerIds
If you wanted to get the MemberIds, you can use :
select memberId from CollaborationGroupMember where CollaborationGroup.LastFeedModifiedDate < LAST_N_DAYS:90
OR
select Id, Name from User where Id IN (select memberId from CollaborationGroupMember where CollaborationGroup.LastFeedModifiedDate < LAST_N_DAYS:90)