Both Republicans likely need the support of Democrats to prevail in their battle over the speakership. Here’s how that could shake out.