I'm not sure what the question means by "use S = n^2"...
At any rate, the given sum
1 + 3 + 5 + … + 301
is simply the sum of the first 151 odd positive integers, which we can write in the form 2n - 1 for n between 1 and 151. That is,
We can expand the sum as
Next, recalling that
it follows that
(Probably "S = n^2" means "sum of n odd integers = n ²")