find the eqauation for this problem

Basketball Scroing- The Fenton College Cougers made 40 filed goals in a recent basketball game,some 2-pointers and the rest 3-pointer, altogether, the 40 baskets counted for 89 point. How many of each tyep of field goal was made?

My answer

X+y=40
2x+3y=89

Looks good to me.