Hello hollydolly,
You will need to carefully remove the deck to access where this spring is supposed to go and connect a new one.
It attaches to the rear bracket as your picture shows but is installed length way back to front on the deck.
I suspect the spring will be the same, regardless of the difference of being a 38" or 42" cut. The part in the picture is the bare tensioner idler without any pulley or the pivot bolt hardware/