Triangle solve method