Which leaders exactly are being referred to in Hebrews 13:7 and 17? I am unclear.

Most scholars agree that the leaders, the outcome of whose way of life we are to consider with a view to imitating their faith (v.7), were the first-generation Christians who established the church in the region to which Hebrews was sent. The reasoning is that the "outcome" (ekbasis in Greek) implies that they are no longer living. This interpretation is certainly plausible. Hebrews 10:32 also seems to point back to an earlier time in the history of the congregations to whom the author wrote this letter. Finally, Hebrews 6:12 speaks of imitating the faith of (deceased) men and women of faith.

A second possibility, of course, is that the leaders are still alive. Either way, the point is to allow ourselves to be inspired by the faith of others. Living a Christian life is difficult without flesh-and-blood examples, whether in scripture or in our current network of relationships.

Hebrews 13:17 is taken by many to refer to the (living) elders of the church. Like shepherds, they keep watch over us. (Note: this is not the usual verb episkopein, from which the term episkopos, overseer, comes.) In close proximity, verse 20 refers to the Great Shepherd of the sheep, Jesus Christ. Now not all churches have elders. But nearly all churches have some sort of leadership structure, explicit or implicit! We are to submit to our leaders--this is a biblical truth. The question that follows logically is, "Are we to do whatever they tell us to do, or only to those things within the ambit of their spiritual oversight that are of a biblical nature?" Though this is debatable (and has been debated endlessly!), obedience is not in question in this passage.

The verb peithein may mean to persuade, but in the medio-passive (as in Hebrews 13:17), peithesthai means "to obey; to pay attention to; to be a follower." See Acts 5:36-37, where the followers of Theudas and Judas the Galilean are said to have "followed" them. This is the same verb we find in Hebrews 13:17. How obedient these followers may have been, once again, is a matter for discussion, but there is no question that they were following their leaders.