When you say "don't how to work with it in ANSYS", what do you mean?
In the ANSYS Help, go to Mechanical APDL and look at the Technology Showcase section. Chapter 49 uses Drucker-Prager.
Read the Theory manual section on Drucker-Prager.
https://ansyshelp.ansys.com/account/secured?returnurl=/Views/Secured/corp/v231/en/ans_thry/thy_mat1.html%23capmodel
It includes literature references that you can also read.
[383] Sandler, I. S., DiMaggio, F. L., & Baladi, G. Y. (1976). Generalized cap model for geological materials. Journal of the Geotechnical Engineering Division. 102, 683-699.
[384] Pelessone, D. (1989). A Modified Formulation of the Cap Model. Gulf Atomic Report GA-C19579, prepared for the Defense Nuclear Agency under Contract DNA-001086-C-0277.
[385] Schwer, L. E. & Murray, Y. D. (1994). A three-invariant smooth cap model with mixed hardening. International Journal for Numerical and Analytical methods in Geomechanics. 18, 657-688.