When the opponents bid to 3NT, a double by the defender who will not be on lead usually acts as lead-directing double, asking for a particular lead, often dummy’s first bid suit.
If both defenders have bid a different suit, the double asks partner to lead his own suit rather than that of the doubler.
If nobody has bid a suit, a double shows a long solid suit and asks partner to lead his shortest suit.
On both auctions, West’s double asks for a club lead.
On the first auction, East would be likely to lead a spade or a diamond without the double. On the second auction, East would be likely to lead a spade without the double.