Here a simple way. Use a common table expression (CTE) to get the top HR for each League and Year. Then join that back to batting to get the players that own the those numbers. The sample data includes a tie which returns both players in no particular order.
CREATE TABLE batting (playerID INT, yearID INT, lgID CHAR(2), HR INT)
INSERT INTO batting
SELECT 1, 2010, 'AL', 40 UNION
SELECT 2, 2010, 'AL', 35 UNION
SELECT 3, 2010, 'NL', 35 UNION
SELECT 4, 2010, 'NL', 30 UNION
SELECT 5, 2011, 'AL', 50 UNION
SELECT 6, 2011, 'AL', 45 UNION
SELECT 3, 2011, 'NL', 45 UNION
SELECT 7, 2011, 'NL', 45 UNION
SELECT 4, 2011, 'NL', 40
;WITH cte AS (
SELECT yearID
,lgID
,MAX(HR) HR_Leader
FROM batting
GROUP BY yearID
,lgID
)
SELECT playerID
,c.*
FROM batting b
INNER JOIN
cte c ON b.yearID=c.yearID
AND b.lgID=c.lgID
AND b.HR=c.HR_Leader
ORDER BY c.yearID DESC
,c.lgID
DROP TABLE batting