I think Detroit wins here. They got a pick and Simek is on an expiring contract. Kostin is overpaid compared to what he would get on free agency with his production this year.
San Jose gets a useful NHL body and Detroit gets an expiring contract + dumps Kostin's 2 mil cap hit for next year to help clear the way for Mo/Ray's extensions and also gets a lottery ticket.