How much yeast did you start off with? And how long was the beer in the primary? If it was at 1.040 when you racked it to secondary, I'll bet primary fermentation wasn't over and you removed most of the yeast with that transfer. Adding yeast that isn't coming from an active starter at that point probably won't do anything as you're pitching into a hostile environment (alcohol, CO2, pH).
At this point, you probably have some seriously oxidized beer that is too sweet. You could try making a starter and pitching it at high krausen to see if that drops the gravity any further, but you'll most likely still end up with oxidized beer.