Recently, the LHCb Collaboration reported on the evidence for a hidden charm pentaquark state with strangeness, i.e., $P_{cs}(4459)$, in the $J/psiLambda$ invariant mass distribution of the $Xi_b^-to J/psi Lambda K^-$ decay. In this work, assuming that $P_{cs}(4459)$ is a $bar{D}^*Xi_c$ molecular state, we study this decay via triangle diagrams $Xi_brightarrow bar{D}_s^{(*)}Xi_cto (bar{D}^{(*)}bar{K})Xi_cto P_{cs} bar{K}to (J/psiLambda) bar{K}$. Our study shows that the production yield of a spin 3/2 $bar{D}^*Xi_c$ state is approximately one order of magnitude larger than that of a spin $1/2$ state due to the interference of $bar{D}_sXi_c$ and $bar{D}_s^*Xi_c$ intermediate states. We obtain a model independent constraint on the product of couplings $g_{P_{cs}bar{D}^*Xi_c}$ and $g_{P_{cs}J/psiLambda}$. With the predictions of two particular molecular models as inputs, we calculate the branching ratio of $Xi_b^-to (P_{cs}to)J/psiLambda K^- $ and compare it with the experimental measurement. We further predict the lineshape of this decay which could be useful to future experimental studies.