There is an accepted answer already (especially concerning your namespace issue), great, just some hints:
There are very rare situation where one should create XML via string concatenation... Especially in connection with strings (special characters!), numbers (format!) and date/time values (culture and format!) it is much better to rely on the implicit translations using SELECT ... FOR XML ...
DECLARE @RateAmt DECIMAL(12,4)=12.0;
This is possible, but not good:
DECLARE @temp XML = '<Rate>' + CONVERT(VARCHAR(20), @RateAmt, 1) +'</Rate>'
Better try this
DECLARE @temp XML=(SELECT @RateAmt FOR XML PATH('Rate'));
Your attempt to insert this into existing XML can be done the way you do it already (create the XML-node externally and insert it as-is), it might be easier to insert the plain value:
DECLARE @tbl TABLE(ID INT IDENTITY,XMLValue XML);
INSERT INTO @tbl VALUES
(N'<Element1><Element2><test>FirstTest</test></Element2></Element1>')
,(N'<Element1><Element2><test>Second</test></Element2></Element1>');
--ID=1: Insert the way you do it:
UPDATE @tbl
SET [XMLValue].modify('insert sql:variable("@temp") as last into (/Element1/Element2)[1]')
WHERE id = 1
--ID=2: Insert the value of @RateAmt directly
SET @RateAmt=100.00;
UPDATE @tbl
SET [XMLValue].modify('insert <Rate>{sql:variable("@RateAmt")}</Rate> as last into (/Element1/Element2)[1]')
WHERE id = 2
This is Result ID=1
<Element1>
<Element2>
<test>FirstTest</test>
<Rate>12.0000</Rate>
</Element2>
</Element1>
And ID=2
<Element1>
<Element2>
<test>Second</test>
<Rate>100</Rate>
</Element2>
</Element1>