Grab Text storing it in a var then adding html method and adding animation to it
At first, you are requesting the element # + ValUe 4 times. That means jQuery need to search to the entire DOM 4 times to get an element. Cache the value of this element and use that cache variable:

var elem = $('#' + ValUe);

elem.html(...);

elem.find(...);


$(this) inside the callback of the .animate method refers to the animated element, you don't need to use $('#' + ValUe).find('h2') again, just use $(this).

You use formVaule once, just use that constructor instead of saving it to a variable.

To complete correct code:

var k = $('input[value="' + ValUe + '"]').next().text();
var elem = $('#' + ValUe);

// Display H2 tag with the content that was stored 
elem.html('&lt;h2&gt;' + k + '&lt;/h2&gt;');

// Animated the h2 tag with a background color
elem.find('h2').animate({ backgroundColor: "#40822B" }, 100, function() {
    // Call a callback function with the attention of removing the background.

    $(this).animate({  backgroundColor: "white"}, 500);

});