yum list packagename
That will show from which repository the package is in the third column of the output.
For already installed packages, that won’t work, as the third column shows just installed. In that case you can do e.g. rpm -qi packagename
, typically the Vendor, Packager and Build Host tags will give an indication to which repository the package belongs. Also it’s quite common for some repo symbol being appended to the package version number.