With this approach, it's assumed that you have Date dimension table available which is very common. I am providing a snippet of the table that is used for this purpose.
Then create a function which does the job.
Call the function by passing any date and it returns the previous bussiness day date.