applescript trim number from variable
Here's one way. We set a variable called "the_phone_number" to some value, then pick off the last three characters. You can probably tell by inspection that it would be easy to modify this script to get the last four, or last two, or whatever.

set the_phone_number to "424-354-3548"
set the_last_three to characters -3 thru -1 of the_phone_number as string