Answer:
Y=2, E=9, A=1, R=0
Step-by-step explanation:
YYYY starts from thousand
EEE starts from hundred
AA starts from tens
R is a units
So we can have
1000Y+100Y+10Y+Y-100E-10E-E+10A+A-R=1234
1111Y - 111E + 11A - R=1234
Y cannot be greater than 2 and it can't be 1 either because
if Y is 1, we will have a total of one thousand one hundred and eleven (1111) which is less than one thousand two hundred and thirty-four (1234) as from the answer in the question
So, it is safe to say Y=2 in order to have two thousand two hundred and twenty-two(2222)
This means that Y must be 2:
2222-111E+11A-R=1234
In this case, E would have to be 9 to make it possible for this to have a solution, by bringing it down to 1223.
YYYY-EEE
2222-999=1223
1223+11A-R=1234
1223+11=1234
This means that A must be 1 and that R must be 0.
2222
- 999
+11
-0
=1234