I have two Tamron lenses. Lens A has a mount ring for Canon, and Lens B has a mount ring for Pentax. Lens A is broken. Can I swap the mount rings and use lens B for my Canon camera?
If your lenses are older Tamron Adaptall style lenses, then yes, you can remove the Canon FD ring and replace it with the Pentax K-mount ring and use the lens with pentax cameras.
Without knowing what specific lenses you have, it's impossible to answer definitively.
There are Tamron lenses with "universal mounts" that can be swapped. These include T-mount and Adaptall mounts.
For electronic mounts (EF), I wouldn't bother. The internal construction and electronics could be significantly different. For instance some lens designs do or don't have image stabilization or mechanical apertures, depending on the target mount.
For non-universal mechanical mounts, it's likely not possible to switch mounts if you also want to have a functional lens.
If any externally visible screws don't match between lenses, it's likely the underlying construction is different enough that switching mounts won't work.
The aperture on FD lenses is open by default, while PK is closed by default. So internally, even for the "same" lens models, the mounts may be different enough that they cannot be switched. The different default aperture positions also explains why some adapters are more complicated than others.
The aperture rings on FD and PK lenses turn in opposite directions. The internal construction of the lenses may be mirror images of each other. Even if they could be switched, the lenses would have to be significantly dismantled to do so.