Electronic spin and orbital (dd) excitation spectra of (Ca{x}La{1-x})(Ba{1.75-x}La{0.25+x})Cu{3}O{y} samples are measured by resonant inelastic x-ray scattering (RIXS). In this compound, Tc of samples with identical hole dopings is strongly affected by the Ca/Ba substitution x due to subtle variations in the lattice constants, while crystal symmetry and disorder as measured by line-widths are x independent. We examine two extreme values of x and two extreme values of hole-doping content y corresponding to antiferromagnetic and superconducting states. The x dependence of the spin mode energies is approximately the same for both the antiferromagnetic and superconducting samples. This clearly demonstrates that RIXS is sensitive to J even in doped samples. A positive correlation between the superexchange J and the maximum of Tc at optimal doping Tc^{max} is observed. We also measured the x dependence of the d_{xy} -> d_{x^2-y^2} and d_{xz/yz} -> d_{x^2-y^2} orbital splittings. We infer that the effect of the unresolved d_{3z^2-r^2} -> d_{x^2-y^2} excitation on Tc^{max} is much smaller than the effect of J. There appears to be dispersion in the d_{xy} -> d_{x^2-y^2} peak of up to 0.05 eV. Our fitting of the peaks furthermore indicates an asymmetric dispersion for the d_{xz/yz} -> d_{x^2-y^2} excitation. A peak at ~0.8 eV is also observed, and attributed to a dd excitation in the chain layer.