If the widths of A, B, and CIN are all same, and say N, then,
'0'&A means adding a bit, whose value is 0, to A, which serves as its most significant bit. By doing so, the width of A becomes N+1. Similar is the case with B. Thus,
The difference between "" and '' is that when using " ", the width of value has to be of more than one bit, whereas when using ' ', the width of value has to be of one bit.
The inference from the above synthesis is that the widths have to be appropriately set for the signals. In the second case, the case of RESULT2, the reason for the assigned expression to be of 9-bit wide is that the sum of the signals, with concatenated values, assumes the sum of their bit-widths as the bit-width of the obtained sum. To correct this, assign the concatenated signals as some other intermediate signals, and then add them.
You are welcome! Logically, there is no difference between the two methods except for their bit-widths. So, you may use any of the two anywhere, provided you make a check for their sizes.
However, if this computational unit (adder in both the cases) is a part of another design, then depending on the required size of the data, proper expression has to be chosen.
The expression you wrote for RESULT2 in your code above contains an error. Since you forgot the brackets combining ('0'&A) and ('0'&B), your expression turned into