This chaupai appears in the Balakanda section of Shri Ramcharitmanas.

सठ सुधरहिं सतसंगति पाई। पारस परस कुधात सुहाई॥ बिधि बस सुजन कुसंगत परहीं। फनि मनि सम निज गुन अनुसरहीं॥
Context: where this chaupai appears in Shri Ramcharitmanas
This chaupai also belongs to the satsang passage of Balkand. Tulsidas ji says that even the wicked are reformed by the company of saints, just as base metal touched by the paras (philosopher's stone) becomes gold. But if, by fate, good people fall into bad company, they still follow their own virtues; like the jewel on a serpent's hood, the company's fault does not stain them.
Read the complete episode containing this chaupai in Shri Ramcharitmanas, also known as the Tulsi Ramayana.
Read the full episode in Shri RamcharitmanasTransliteration
Sath Sudharahin Satsangati Pai. Paras Paras Kudhat Suhai.. Bidhi Bas Sujan Kusangat Parahin. Fani Mani Sam Nij Gun Anusarahin..
In Latin script this chaupai is also written as “Bidhi Bas Sujan Kusangat Parahin” or “Vidhi Bas Sujan Kusangat Parhi”. The spelling varies; the verse is the same.
Word meanings
- Sath = the wicked
- Satsangati = company of saints
- Paras paras = by the touch of the philosopher's stone
- Kudhat = base metal
- Suhai = becomes beautiful (turns to gold)
- Bidhi bas = by fate
- Sujan = good people
- Kusangat = bad company
- Fani mani = the jewel on a serpent's hood
- Nij gun anusarahin = follow their own virtues
As a Shalaka answer
This answer points towards company. The circumstances around the matter you asked about are not favourable; the path becomes clear only after leaving the company of the crooked. As things stand, completion of the work is doubtful.