I actually like this for NY. They picked up a solid prospect in DSJ and cleared $30M from their books next year. They now have a ton of financial flexibility going forward, and for a large market like the Knicks, that's worth a lot. All at the cost of a player who didn't want to be there, is coming off of a major injury, and is IMHO overrated even when healthy.
For Dallas, the price wasn't huge, so there's that. But as I said, I'm no fan of Porzingis. If he comes back undiminished from injury, continues to develop, and signs in Dallas long-term, then it's a very good deal for them. But if any of those items don't happen, then they hosed themselves.