The match method returns a MatchData object (or nil if there was no match). You seem to want to run the second match on the first match string value. So, just use
def center2 (a)
b = a[/(?<=_).*$/]
c = b[/(?<=A).*$/]
end
See the Ruby demo
Actually, if these patterns are placeholders for more complicated patterns, and the task is to find a substring after the first _ and then the rightmost A, you may shorten this code to
def center2 (a)
a[/_.*?A\K.*/]
end
See this Ruby demo. Do not forget about m modifier if you need to match across lines (. does not match line breaks by default). _ will match the first _ from the left, .*?A will match any 0+ chars as few as possible up to and including the closest A and \K will omit the matched text and .* will match and return any 0+ chars (other than line break chars by default).