Your starting point was correct, the only thing you missed is the variable $linkTo. I can't see that is set in you quote.
if you simple want always to use "Link A" as target url for your slideshow you could use this code:
<?php
foreach ($articles as $key=>$article):
$articleLinks = json_decode($article->urls);
$link = $articleLinks->urla;
?>
<a title="<?php echo $article->title;?>" href="<?php echo $link;?>"><?php echo $article->title;?></a>
<?php
endforeach;
?>
If you like to use "Link A" only if it is set you could check if it exists:
<?php
foreach ($articles as $key=>$article):
$articleLinks = json_decode($article->urls);
$link = ($articleLinks->urla ? $articleLinks->urla : $article->link);
?>
<a title="<?php echo $article->title;?>" href="<?php echo $link;?>"><?php echo $article->title;?></a>
<?php
endforeach;
?>