V=g[r,t]H[(S/(g[r,t])),t];

(* construct the convertable bond pricing equation *)

CBPE=D[V,{t,1}]+(1/2)(σ^2)(S^2)D[V,{S,2}]+ρ σ S w D[V,{S},{r}]+(1/2)(w^2)D[V,{r,2}]+r S D[V,S]+ (u - λ w) D[V,r]-r V//Simplify

(* lets put in the fact that g[r,t] satisfied the bond pricing equation by replacing the time derivative of g *)

t1=CBPE/.{Derivative[0,1][g][r,t]->((-1)/2)(w^2)Derivative[2,0][g][r,t]-(u-λ w)Derivative[1,0][g][r,t]+r g[r,t]}//Simplify