I think that map might have got things mixed up. The Welsh didn't move to or from Scotland; Scotland, or Alba, was inhabited by native "Welsh" (Old English
wealh, plural
wealas, a general Germanic word to refer to Romance and Celtic speakers, as in Wales, Wallonia, Gaul, Wallachia, Cornwall and others). For centuries, the Welsh from all across Britain, including modern Wales, Cornwall and Alba (Scotland), saw themselves as one people. The Welsh of Strathclyde (
*Cumri in their own Old Welsh dialect; compare with
Cymry) would eventually develop a separate identity and be known as
Cumbrians.
The Scots were originally an Irish, Goidelic-speaking tribe. At the time they settled Alba, as I said, that land was populated by Brythonic-speaking peoples, who the early Anglo-Saxons called
brittas or
wealas. The Scots then became a ruling elite, with the population remaining Brythonic-speaking for centuries. However, a process of Goidelization started, and eventually the common people were mainly Goidelic speakers (that would become the Scottish Gaelic language, which didn't split off from Irish until the early Modern period). Therefore, by c. 1000, the Scots (now commonly called
scottas in Old English) were, for the most part, a Goidelic-speaking folk of Brythonic stock who had always been native to Alba and hadn't really invaded from Ireland - they had just absorbed a foreign people and inherited their name. Later Scottish migrations to Ireland are a different matter.
And that's without taking into account heavy Norse and Northumbrian influence in certain areas.