For an NBA team to buy a 2nd-round draft pick with cash, the typical amount depends on the quality of the pick and the year, but the usual range is:
Late 2nd-round pick (55–60): about $500,000–$1.5 million
Middle 2nd-round pick (35–50): about $1.5–$3 million
Early 2nd-round pick (31–35): about $3–$5+ million
The NBA has a cash-trade limit that changes yearly (the amount of cash teams can send or receive in trades), so teams cannot just pay unlimited money. In recent seasons, the limit has been around $7 million per team per season.