When we opened the shed door, we discovered the source of the scratching noise; a baby raccoon trapped in a corner.
When we opened the shed door, we discovered the source of the scratching noise: a baby raccoon trapped in a corner.
In the second sentence, a colon correctly introduces an appositive.
For more help, see sections P1 and P3.