Here are two triggers for you. You may need a third one on Accounts, but I leave that as an exercise.
CREATE TRIGGER Budget_Accounts_tri ON Budget_Accounts AFTER INSERT, UPDATE AS
IF EXISTS (SELECT *
FROM inserted i
JOIN Budgets B ON i.IDBudget = B.IDBudget
JOIN Accounts A ON i.IDAccount = A.IDAccount
WHERE A.IDUser = B.IDUser)
BEGIN
ROLLBACK TRANSACTION
RAISERROR('Budget is using accounts for a different user.', 16, 1)
END
go
CREATE TRIGGER Budget_Tri ON Budget AFTER INSERT, UPDATE AS
IF EXISTS (SELECT *
FROM inserted i
JOIN Budget_Accounts BA ON i.IDBudget = BA.IDBudget
JOIN Accounts A ON BA.IDAaccount = A.IDAccount)
BEGIN
ROLLBACK TRANSACTION
RAISERROR('Budget is using accounts for a different user.', 16, 1)
END
The table "inserted " that flourishes is a virtual table which holds the row inserted by an INSERT statement, and the result rows from an UPDATE statement. In triggers you can also used "deleted" for the deleted rows in a DELETE statement, and a before-image of a row for an UPDATE statement.
I'm a little curious about the data model. It suggests that every user have their own set of accounts. That seems a little odd to me, but I don't know what this is a data model for.