The state of Washington has reached a $518 million settlement with three drug distributors over their role in the opioid crisis.