Crystal, 203 194 187 bytes
o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l==1||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]
o=""
v=c=0
l=1
ARGV[0].each_char{|a|"aeiouy"=~/#{a}/&&(v=x=1)||(c=v)
o += a if l==1||x
o += (i="pgtvkgbqrzdfs".index(a))?"bcdfgkpqrstvz"[i]: a if c*l>0
c>0&&(l=0)&&x&&break}
p o+o[-2..-1]