Answer by taking a quote from the following article:

Richard Hirschfeld Williams (May 7, 1929 - July 7, 2011) was an American left fielder, third baseman, manager, coach and front office consultant in Major League Baseball. Known especially as a hard-driving, sharp-tongued manager from 1967 to 1969 and from 1971 to 1988, he led teams to three American League pennants, one National League pennant, and two World Series triumphs. He is one of seven managers to win pennants in both major leagues, and joined Bill McKechnie in becoming only the second manager to lead three franchises to the Series. He and Lou Piniella are the only managers in history to lead four teams to seasons of 90 or more wins.

When another perennial loser, the Seattle Mariners, lost 19 of their first 28 games in 1986 under Chuck Cottier, Williams came back to the American League West on May 6 for the first time in almost a decade. The Mariners showed some life that season and almost reached .500 the following season. However, Williams' autocratic managing style no longer played with the new generation of ballplayers. Williams was fired on June 8, 1988 with Seattle 23-33 and in sixth place. It would be his last major-league managing job. Williams' career won-loss totals were 1,571 wins and 1,451 losses over 21 seasons.  In 1989, Williams was named manager of the West Palm Beach Tropics of the Senior Professional Baseball Association, a league featuring mostly former major league players 35 years of age and older. The Tropics went 52-20 in the regular season and ran away with the Southern Division title. Despite their regular season dominance, the Tropics lost 12-4 to the St. Petersburg Pelicans in the league's championship game. The Tropics folded at the end of the season, and the rest of the league folded a year later.  He remained in the game, however, as a special consultant to George Steinbrenner and the New York Yankees. In 1990, Williams published his autobiography, No More Mister Nice Guy. His acrimonious departure in 1969 distanced Williams from the Red Sox for the remainder of the Yawkey ownership period (through 2001), but after the change in ownership and management that followed, he was selected to the team's Hall of Fame in 2006.  Williams's number was recently retired by the Fort Worth Cats. The Cats were a popular minor league team in Fort Worth and Williams played there while he was working his way through the Dodgers system. The Cats merged/disbanded around 1960 but in recent years returned as an independent minor league team. The "New" Cats retired Williams' number.

how long did he play with them?
Yankees. In 1990,