<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script>
function ans (a) {
var id = $(a).attr('data-id');
var username = $(a).attr('data-username');
$('#answer').val(id+username)
}
</script>
</head>
<body>
<a href="#" data-id="<id>" data-username="<username>" onclick="ans(this);">Ответить</a>
<textarea id="answer"></textarea>
</body>
</html>