From Pine Creek, the Courier can either enter the nearby cave to set explosives and close off the entrance, or kill the yao guai outside the cave. The cave option does not require combat. Completion of either option ends the quest successfully, and the particular method chosen has no effect on the rest of the game.
If opting to collapse the cave entrance, the cave must be entered. From here, the cave may be explored, and three marked positions on the floor (that look like transparent "mining explosives") mark where the explosives must be placed. The "mining explosives" are not traditional "items" that can be carried; instead, they are a part of the cave and only need to be enabled. They are visually identical to C-4 plastic explosive. There are three yao guai in a central area of the cave, but killing them is not a requirement for this quest as they can be avoided while placing the explosives. When all three explosives are set, the Courier should exit the cave and trigger the mining detonator, sealing the cave and completing the quest.
If the Courier chooses to kill the yao guai outside the cave, they can simply follow the map markers to the targets and dispatch them. Once all of the target yao guai are killed, the quest is complete.
Even if the Courier kills the yao guai in the cave before this quest, they may respawn. If they did not, the only way to complete the quest is to plant the explosives.
Look closely for the charge markers, as they blend in with the cave floor making them difficult to see in the dark.
If the explosives are planted in the cave without triggering them, and then the yao guai are killed at Pine Creek, the quest will be compromised and can not be completed.
Waking Cloud will comment that it is very dangerous to directly attack the yao guai at Pine Creek. She can be reassured, but will remain skeptical.
Once the explosives are set off, the yao guai cave cannot be entered again.
It is possible to complete both optional parts of the quest, but it requires good timing. After killing the third and final yao guai, it is possible to quickly switch to the detonator and collapse the cave (assuming the mines were activated previously). However, this will not give any extra rewards.