Assuming you're looking only for groups that are direct members of the target group (and not members of groups that are direct member of the target group), this should get you started:
Get-ADGroup groupx -property member |
ForEach-Object{
$x = Get-ADObject $_.distinguishedName
if ($x.objectClass -eq 'group'){
$x.name
}
}