Msg 8985, Level 16, State 1,Could not locate file 'MyTal_Log'
I would start by saying that shrinking, be it that of data or log file, is really bad avoid it as much as possible. There is hardly anything you can benefit, specially with what you are doing.

As for your question look at the below specific error message


  Msg 8985, Level 16, State 1, Line 16 Could not locate file 'MyTal_Log' for database 'master' in sys.database_files


The query is looking for logical file named MyTal_log in master, is this the logical filename of log file of database tal ?, I believe it is not. To  confirm run below

sp_helpdb Tal


As shown in pic, select the logical name and use that name in the query, this is Tal database created on my system.



DBCC SQLPERF (Logspace)
USE master;
GO
ALTER DATABASE Tal
 SET RECOVERY FULL;
GO
BACKUP DATABASE Tal 
TO DISK = 'D:\SQLServerBackups\MyTalLog.bak'
 WITH FORMAT;
GO 
-- Truncate the log by changing the database recovery model to SIMPLE.
ALTER DATABASE TAL
SET RECOVERY SIMPLE;
GO
-- Shrink the truncated log file to 1 MB.
USE tal--**database name**
GO
DBCC SHRINKFILE ('MyTal_Log', 1,TRUNCATEONLY);--add correct logical name
GO
-- Reset the database recovery model.
ALTER DATABASE TAL
SET RECOVERY FULL;
GO